Merge pull request #6 from chrisbeall/fix/compiler-and-cmake-mac
Mac compiler fixes and GeographicLib upgraderelease/4.3a0
commit
690b2b8aed
|
|
@ -41,6 +41,10 @@ add_subdirectory(ceres)
|
|||
# add_subdirectory (tools)
|
||||
|
||||
# Find GeographicLib using the find script distributed with it
|
||||
unset(GEOGRAPHICLIB_FOUND CACHE)
|
||||
unset(GeographicLib_INCLUDE_DIRS CACHE)
|
||||
unset(GeographicLib_LIBRARIES CACHE)
|
||||
unset(GeographicLib_LIBRARY_DIRS CACHE)
|
||||
include(GeographicLib/cmake/FindGeographicLib.cmake)
|
||||
|
||||
# Set up the option to install GeographicLib
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ A library for geographic projections.
|
|||
Written by Charles Karney <charles@karney.com> and licensed under
|
||||
the MIT/X11 License. For more information, see
|
||||
|
||||
http://geographiclib.sourceforge.net/
|
||||
https://geographiclib.sourceforge.io/
|
||||
|
||||
Files
|
||||
|
||||
|
|
@ -13,131 +13,57 @@ Files
|
|||
INSTALL -- brief installation instructions
|
||||
NEWS -- a history of changes
|
||||
|
||||
include/GeographicLib/ and src/
|
||||
Config.h.in, Config.h -- system dependent configuration
|
||||
Constants.hpp -- WGS84 constants
|
||||
Math.hpp -- math routines
|
||||
Utility.hpp -- I/O and date routines
|
||||
Accumulator.[ch]pp -- quad precision adder
|
||||
PolarStereographic.[ch]pp -- polar stereographic projection
|
||||
TransverseMercator.[ch]pp -- transverse Mercator projection
|
||||
UTMUPS.[ch]pp -- UTM and UPS
|
||||
MGRS.[ch]pp -- MGRS
|
||||
TransverseMercatorExact.[ch]pp -- exact TM projection
|
||||
EllipticFunction.[ch]pp -- elliptic functions
|
||||
GeoCoords.[ch]pp -- hold geographic location
|
||||
DMS.[ch]pp -- handle degrees minutes seconds
|
||||
Geocentric.[ch]pp -- geocentric coordinates
|
||||
LocalCartesian.[ch]pp -- local cartesian coordinates
|
||||
Geodesic.[ch]pp -- geodesic calculations
|
||||
GeodesicLine.[ch]pp -- calculations on a single geodesic
|
||||
PolygonArea.[ch]pp -- polygon area
|
||||
AzimuthalEquidistant.[ch]pp -- azimuthal equidistant projection
|
||||
Gnomonic.[ch]pp -- gnomonic projection
|
||||
CassiniSoldner.[ch]pp -- Cassini-Soldner equidistant projection
|
||||
Geoid.[ch]pp -- geoid heights
|
||||
Gravity{Model,Circle}.[ch]pp -- gravity models
|
||||
Magnetic{Model,Circle}.[ch]pp -- geomagentic models
|
||||
{Spherical,Circular}Engine.[ch]pp -- spherical harmonic sums
|
||||
SphericalHarmonic{,1,2}.hpp -- frontend for spherical harmonics
|
||||
LambertConformalConic.[ch]pp -- Lambert conformal conic projection
|
||||
AlbersEqualArea.[ch]pp -- Albers equal area projection
|
||||
Gnomonic.[ch]pp -- Ellipsoidal gnomonic projection
|
||||
OSGB.[ch]pp -- Ordnance Survey grid system
|
||||
Geohash.[ch]pp -- conversions for geohashes
|
||||
Ellipsoid.[ch]pp -- ellipsoid properties
|
||||
include/GeographicLib/*.hpp
|
||||
headers for the library
|
||||
src/*.cpp
|
||||
implementation for the library
|
||||
|
||||
examples/
|
||||
example-*.cpp -- simple usage examples for all the classes
|
||||
GeoidToGTX.cpp -- a parallelization example
|
||||
examples for each class
|
||||
|
||||
tools/
|
||||
GeoConvert.cpp -- geographic conversion utility
|
||||
TransverseMercatorTest.cpp -- TM tester
|
||||
GeodSolve.cpp -- geodesic utility
|
||||
CartConvert.cpp -- convert to geocentric and local cartesian
|
||||
EquidistantTest.cpp -- exercise AzimuthalEquidistant and CassiniSoldner
|
||||
GeoidEval.cpp -- evaluate geoid heights
|
||||
Gravity.cpp -- evaluate gravity
|
||||
MagneticField.cpp -- evaluate magnetic field
|
||||
Planimeter.cpp -- computer polygon areas
|
||||
geographiclib-get-geoids -- download geoid datasets
|
||||
geographiclib-get-magnetic -- download geomagnetic models
|
||||
|
||||
windows/
|
||||
GeographicLib-vc9.sln -- MS Studio 2008 solution
|
||||
Geographic-vc9.vcproj -- project for library
|
||||
GeoConvert-vc9.vcproj -- project for GeoConvert
|
||||
TransverseMercatorTest-vc9.vcproj -- project for TransverseMercatorTest
|
||||
Geod-vc9.vcproj -- project for Geod
|
||||
Planimeter-vc9.vcproj -- project for Planimeter
|
||||
CartConvert-vc9.vcproj -- project for CartConvert
|
||||
EquidistantTest-vc9.vcproj -- project for EquidistantTest
|
||||
GeoidEval-vc9.vcproj -- project for GeoidEval
|
||||
Gravity-vc9.vcproj -- project for Gravity
|
||||
MagneticField-vc9.vcproj -- project for MagneticField
|
||||
also files for MS Studio 2005 (with vc8)
|
||||
also files for MS Studio 2010 (with vc10)
|
||||
NETGeographic-vc10.vcxproj -- project for .NET wrapper
|
||||
|
||||
maxima/
|
||||
tm.mac -- Maxima code for high precision TM
|
||||
ellint.mac -- Maxima code for elliptic functions needed by tm.mac
|
||||
tmseries.mac -- Maxima code for series approximations for TM
|
||||
geod.mac -- Maxima code for series approximations for Geodesic
|
||||
geodesic.mac -- Maxima code for geodesic problems
|
||||
|
||||
matlab/
|
||||
geographiclibinterface.m -- Matlab code to compile Matlab interfaces
|
||||
utmupsforward.{cpp,m} -- Matlab code to convert geographic to UTM/UPS
|
||||
utmupsreverse.{cpp,m} -- Matlab code to convert UTM/UPS to geographic
|
||||
mgrsforward.{cpp,m} -- Matlab code to convert UTM/UPS to MGRS
|
||||
mgrsreverse.{cpp,m} -- Matlab code to convert MGRS to UTM/UPS
|
||||
geodesicdirect.{cpp,m} -- Matlab code for the direct geodesic problem
|
||||
geodesicinverse.{cpp,m} -- Matlab code for the inverse geodesic problem
|
||||
geodesicline.{cpp,m} -- Matlab code for geodesic lines
|
||||
geoidheight.{cpp,m} -- Matlab code to look up geoid heights
|
||||
polygonarea.{cpp,m} -- Matlab code for polygon areas
|
||||
geoddoc.m -- documentation for native Matlab geodesic routines
|
||||
geodreckon.m -- native Matlab implementation of direct geodesic problem
|
||||
geoddistance.m -- native Matlab implementation of inverse geodesic problem
|
||||
geodarea.m -- native Matlab implementation of polygon area
|
||||
defaultellipsoid.m, ecc2flat.m, flat2ecc.m -- auxiliary functions
|
||||
geodproj.m -- documentation for geodesic projections
|
||||
*_{fwd,inv}.m -- native Matlab implementation of geodesic projections
|
||||
private/*.m -- internal functions for geodesic routines
|
||||
|
||||
doc/
|
||||
doxyfile.in -- Doxygen config file
|
||||
Geographic.dox -- main page of Doxygen documentation
|
||||
geodseries30.html -- geodesic series to 30th order
|
||||
tmseries30.html -- transverse Mercator series to 30th order
|
||||
html/* -- directory with built documentation
|
||||
scripts/*.html -- demonstrations of the JavaScript interface
|
||||
scripts/GeographicLib/*.js -- JavaScript implementation of geodesics
|
||||
|
||||
man/
|
||||
*.pod -- plain old documentation
|
||||
*.1 -- man pages in nroff format
|
||||
*.1.html -- man pages in html format
|
||||
*.usage -- documentation for incorporation into executables
|
||||
|
||||
python/GeographicLib/*.py -- Python implementation of geodesic routines
|
||||
|
||||
java/.../*.java -- Java implementation of geodesic routines
|
||||
|
||||
dotnet/NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
|
||||
dotnet/examples/CS/*.cs -- simple C# examples for each class
|
||||
dotnet/examples/ManagedCPP/*.cpp -- Managed C++ examples for each class
|
||||
dotnet/examples/VB/*.vb -- simple Visual Basic examples for each class
|
||||
dotnet/Projection/* -- a more complex C# application
|
||||
|
||||
legacy/C/* -- C implementation of geodesic routines
|
||||
legacy/Fortran/* -- Fortran implementation of geodesic routines
|
||||
command-line utilities
|
||||
|
||||
Makefile.mk -- Unix/Linux makefiles
|
||||
configure -- autoconf configuration script
|
||||
CMakeLists.txt -- cmake configuration files
|
||||
cmake/
|
||||
FindGeographicLib.cmake -- cmake find script
|
||||
*.cmake.in -- cmake config templates
|
||||
support files for building with CMake
|
||||
|
||||
windows/
|
||||
project files for building under Windows (but CMake is preferred)
|
||||
|
||||
maxima/
|
||||
Maxima code for generating series expansions, etc.
|
||||
|
||||
matlab/
|
||||
geographiclib/
|
||||
*.m, private/*.m -- Matlab implementation of some classes
|
||||
geographiclib-legacy/
|
||||
*.{m,cpp} -- legacy Matlab routines
|
||||
|
||||
doc/
|
||||
files for generating documentation with Doxygen
|
||||
|
||||
man/
|
||||
man pages for the utilities
|
||||
|
||||
python/GeographicLib/*.py -- Python implementation of geodesic routines
|
||||
|
||||
java/.../*.java -- Java implementation of geodesic routines
|
||||
|
||||
js/
|
||||
src/*.js -- JavaScript implementation of geodesic routines
|
||||
samples/*.html -- demonstrations of the JavaScript interface
|
||||
|
||||
legacy/
|
||||
C/ -- C implementation of geodesic routines
|
||||
Fortran/ -- Fortran implementation of geodesic routines
|
||||
|
||||
dotnet/
|
||||
NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
|
||||
examples/
|
||||
CS/*.cs -- simple C# examples for each class
|
||||
ManagedCPP/*.cpp -- Managed C++ examples for each class
|
||||
VB/*.vb -- simple Visual Basic examples for each class
|
||||
Projection/ -- a more complex C# application
|
||||
|
|
|
|||
|
|
@ -2,5 +2,10 @@ Charles Karney <charles@karney.com>
|
|||
Francesco Paolo Lovergine <frankie@debian.org> (autoconfiscation)
|
||||
Mathieu Peyréga <mathieu.peyrega@gmail.com> (help with gravity models)
|
||||
Andrew MacIntyre <Andrew.MacIntyre@acma.gov.au> (python/setup.py)
|
||||
Skip Breidbach <skip.breidbach@sri.com> (maven support for Java)
|
||||
Skip Breidbach <skip@waywally.com> (maven support for Java)
|
||||
Scott Heiman <mrmtdew2@outlook.com> (.NET wrappers + C# examples)
|
||||
Chris Bennight <chris@bennight.com> (deploying Java library)
|
||||
Sebastian Mattheis <Sebastian.Mattheis@bmw.de> (gnomonic projection in Java)
|
||||
Yurij Mikhalevich <0@39.yt> (node.js port)
|
||||
Phil Miller <phillip.miller@sri.com> (putting tests into python/setup.py)
|
||||
Jonathan Takahashi <jtakahashi@gmail.com> (boost-python sample)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ project (GeographicLib)
|
|||
|
||||
# Version information
|
||||
set (PROJECT_VERSION_MAJOR 1)
|
||||
set (PROJECT_VERSION_MINOR 35)
|
||||
set (PROJECT_VERSION_MINOR 49)
|
||||
set (PROJECT_VERSION_PATCH 0)
|
||||
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
if (PROJECT_VERSION_PATCH GREATER 0)
|
||||
|
|
@ -12,23 +12,23 @@ endif ()
|
|||
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=1.37-001-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.
|
||||
# -D CPACK_PACKAGE_VERSION_MINOR=36
|
||||
# -D CPACK_PACKAGE_VERSION_SUFFIX=-001-SNAPSHOT
|
||||
# Check that the version numbers are consistent.
|
||||
if (CPACK_PACKAGE_VERSION_COUNT EQUAL 2)
|
||||
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
set (CPACK_PACKAGE_VERSION_PATCH 0)
|
||||
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))
|
||||
CPACK_PACKAGE_VERSION_MINOR EQUAL PROJECT_VERSION_MINOR AND
|
||||
CPACK_PACKAGE_VERSION_PATCH EQUAL PROJECT_VERSION_PATCH))
|
||||
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 ()
|
||||
|
|
@ -42,8 +42,8 @@ endif ()
|
|||
|
||||
# The library version tracks the numbering given by libtool in the
|
||||
# autoconf set up.
|
||||
set (LIBVERSION 10)
|
||||
set (LIBVERSIONFULL 10.1.2)
|
||||
set (LIBVERSION_API 17)
|
||||
set (LIBVERSION_BUILD 17.1.2)
|
||||
string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
|
||||
|
||||
|
|
@ -61,63 +61,22 @@ cmake_minimum_required (VERSION 2.8.4) # This version was released 2011-02-16
|
|||
# CMAKE_INSTALL_PREFIX being used when it's ON.
|
||||
|
||||
if (WIN32)
|
||||
option (COMMON_INSTALL_PATH "Use a common installation path for packages" OFF)
|
||||
option (COMMON_INSTALL_PATH "Use a common installation path for packages"
|
||||
OFF)
|
||||
else ()
|
||||
option (COMMON_INSTALL_PATH "Use a common installation path for packages" ON)
|
||||
endif ()
|
||||
|
||||
# The use of PACKAGE_PATH and INSTALL_PATH is now DEPRECATED.
|
||||
# (2) PACKAGE_PATH and INSTALL_PATH govern the find_package search
|
||||
# path and the installation directory. (find_package is not used by
|
||||
# GeographicLib since it doesn't depend on other packages. However
|
||||
# PACKAGE_PATH is used here for uniformity with other packages which
|
||||
# adopt the same conventions.)
|
||||
#
|
||||
# If PACKAGE_PATH is defined, it is prepended to CMAKE_PREFIX_PATH.
|
||||
#
|
||||
# If INSTALL_PATH is not specified but PACKAGE_PATH is, then
|
||||
# INSTALL_PATH is set to
|
||||
# ${PACKAGE_PATH}, if COMMON_INSTALL_PATH is ON;
|
||||
# ${PACKAGE_PATH}/${PROJECT_NAME}-${PROJECT_VERSION}, otherwise.
|
||||
#
|
||||
# If INSTALL_PATH is now defined, then set CMAKE_INSTALL_PREFIX to
|
||||
# INSTALL_PATH.
|
||||
#
|
||||
# Typically, only PACKAGE_PATH needs to be specified, e.g.,
|
||||
# cmake -D PACKAGE_PATH=/opt .. (on Linux)
|
||||
# => CMAKE_PREFIX_PATH=/opt CMAKE_INSTALL_PREFIX=/opt
|
||||
# cmake -D PACKAGE_PATH=C:/pkg .. (on Windows)
|
||||
# => CMAKE_PREFIX_PATH=C:/pkg CMAKE_INSTALL_PREFIX=C:/pkg/GeographicLib-1.22
|
||||
|
||||
if (PACKAGE_PATH)
|
||||
set (CMAKE_PREFIX_PATH ${PACKAGE_PATH} ${CMAKE_PREFIX_PATH})
|
||||
message (STATUS "CMAKE_PREFIX_PATH set to ${CMAKE_PREFIX_PATH}")
|
||||
endif ()
|
||||
|
||||
if (NOT INSTALL_PATH AND PACKAGE_PATH)
|
||||
if (COMMON_INSTALL_PATH)
|
||||
set (INSTALL_PATH ${PACKAGE_PATH} CACHE PATH "Installation directory" FORCE)
|
||||
else ()
|
||||
set (INSTALL_PATH ${PACKAGE_PATH}/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
CACHE PATH "Installation directory" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
if (INSTALL_PATH)
|
||||
file (TO_CMAKE_PATH ${INSTALL_PATH} CMAKE_INSTALL_PREFIX)
|
||||
message (STATUS "CMAKE_INSTALL_PREFIX set to ${CMAKE_INSTALL_PREFIX}")
|
||||
endif ()
|
||||
# (2) PACKAGE_PATH and INSTALL_PATH have now been removed
|
||||
|
||||
# (3) Where to look for data files. Various classes look in the geoids,
|
||||
# gravity, magnetic, subdirectories of ${GEOGRAPHICLIB_DATA}.
|
||||
if (WIN32)
|
||||
# The binary installers for the data files for Windows are created
|
||||
# with Inno Setup which uses {commonappdata}. On most Windows
|
||||
# systems this is
|
||||
# "C:/Documents and Settings/All Users/Application Data", while on
|
||||
# newer systems (Windows 7), it is C:/ProgramData. However the
|
||||
# longer name "works" on all Windows systems.
|
||||
# with Inno Setup which uses {commonappdata} which (since Windows
|
||||
# Vista) is C:/ProgramData.
|
||||
set (GEOGRAPHICLIB_DATA
|
||||
"C:/Documents and Settings/All Users/Application Data/GeographicLib"
|
||||
"C:/ProgramData/GeographicLib"
|
||||
CACHE PATH "Location for data for GeographicLib")
|
||||
else ()
|
||||
set (GEOGRAPHICLIB_DATA
|
||||
|
|
@ -136,15 +95,15 @@ endif ()
|
|||
set_property (CACHE GEOGRAPHICLIB_LIB_TYPE
|
||||
PROPERTY STRINGS "SHARED" "STATIC" "BOTH")
|
||||
|
||||
if ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "BOTH")
|
||||
if (GEOGRAPHICLIB_LIB_TYPE STREQUAL "BOTH")
|
||||
set (GEOGRAPHICLIB_SHARED_LIB ON)
|
||||
set (GEOGRAPHICLIB_STATIC_LIB ON)
|
||||
set (GEOGRAPHICLIB_LIB_TYPE_VAL 2)
|
||||
elseif ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "SHARED")
|
||||
elseif (GEOGRAPHICLIB_LIB_TYPE STREQUAL "SHARED")
|
||||
set (GEOGRAPHICLIB_SHARED_LIB ON)
|
||||
set (GEOGRAPHICLIB_STATIC_LIB OFF)
|
||||
set (GEOGRAPHICLIB_LIB_TYPE_VAL 1)
|
||||
elseif ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "STATIC")
|
||||
elseif (GEOGRAPHICLIB_LIB_TYPE STREQUAL "STATIC")
|
||||
set (GEOGRAPHICLIB_SHARED_LIB OFF)
|
||||
set (GEOGRAPHICLIB_STATIC_LIB ON)
|
||||
set (GEOGRAPHICLIB_LIB_TYPE_VAL 0)
|
||||
|
|
@ -174,29 +133,24 @@ else ()
|
|||
set (PROJECT_DEFINITIONS ${PROJECT_STATIC_DEFINITIONS})
|
||||
endif ()
|
||||
|
||||
# (5) Compile the Matlab interfaces? Skip Matlab compilation if OFF
|
||||
set (MATLAB_COMPILER OFF CACHE STRING
|
||||
"Compiler for matlab/octave interface: mex or mkoctfile or OFF")
|
||||
set_property (CACHE MATLAB_COMPILER PROPERTY STRINGS "mex" "mkoctfile" OFF)
|
||||
|
||||
# (6) Create the documentation? This depends on whether doxygen can be
|
||||
# (5) Create the documentation? This depends on whether doxygen can be
|
||||
# found. If this is OFF, then links will be provided to the online
|
||||
# documentation on Sourceforge.
|
||||
option (GEOGRAPHICLIB_DOCUMENTATION
|
||||
"Use doxygen to create the documentation" OFF)
|
||||
|
||||
# (7) Build .NET wrapper library NETGeographicLib. This only applies to
|
||||
# (6) Build .NET wrapper library NETGeographicLib. This only applies to
|
||||
# Windows. Default is OFF, because, currently, most people don't use
|
||||
# this interface.
|
||||
option (BUILD_NETGEOGRAPHICLIB "Build NETGeographicLib library" OFF)
|
||||
|
||||
# (8) Set the default "real" precision. This should probably be left
|
||||
# (7) Set the default "real" precision. This should probably be left
|
||||
# at 2 (double).
|
||||
set (GEOGRAPHICLIB_PRECISION 2 CACHE STRING
|
||||
"Default real precision: 1 = float, 2 = double, 3 = long double")
|
||||
set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3)
|
||||
"Precision: 1 = float, 2 = double, 3 = extended, 4 = quadruple, 5 = variable")
|
||||
set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3 4 5)
|
||||
|
||||
# (9) When making a binary package, should we include the debug version
|
||||
# (8) When making a binary package, should we include the debug version
|
||||
# of the library? This applies to MSVC only, because that's the
|
||||
# platform where debug and release compilations do not inter-operate.
|
||||
# It requires building as follows:
|
||||
|
|
@ -206,6 +160,23 @@ set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3)
|
|||
option (PACKAGE_DEBUG_LIBS
|
||||
"Include debug versions of library in binary package" OFF)
|
||||
|
||||
# (9) Try to link against boost when building the examples. The
|
||||
# NearestNeighbor example optionally uses the Boost library. Set to ON,
|
||||
# if you want to exercise this functionality. Default is OFF, so that
|
||||
# cmake configuration isn't slowed down looking for Boost.
|
||||
option (USE_BOOST_FOR_EXAMPLES
|
||||
"Look for Boost library when compiling examples" OFF)
|
||||
|
||||
# (10) On Mac OS X, build multiple architectures? Set to ON to build
|
||||
# i386 and x86_64. Default is OFF, meaning build for default
|
||||
# architecture.
|
||||
option (APPLE_MULTIPLE_ARCHITECTURES
|
||||
"Build multiple architectures for Apple systems" OFF)
|
||||
|
||||
# (11) Convert warnings into errors? Default is OFF. If the tests
|
||||
# directory is present you get this behavior regardless.
|
||||
option (CONVERT_WARNINGS_TO_ERRORS "Convert warnings into errors?" OFF)
|
||||
|
||||
set (LIBNAME Geographic)
|
||||
if (MSVC OR CMAKE_CONFIGURATION_TYPES)
|
||||
# For multi-config systems and for Visual Studio, the debug version of
|
||||
|
|
@ -213,48 +184,262 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES)
|
|||
set (CMAKE_DEBUG_POSTFIX _d)
|
||||
endif ()
|
||||
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/tests/CMakeLists.txt)
|
||||
set (DEVELOPER ON)
|
||||
else ()
|
||||
set (DEVELOPER OFF)
|
||||
endif ()
|
||||
|
||||
if (NOT MSVC)
|
||||
# Set the run time path for shared libraries for non-Windows machines.
|
||||
# (1) include link path for external packages (not needed with
|
||||
# GeographicLib because there are no external packages).
|
||||
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
# GeographicLib because there are no external packages). This only
|
||||
# makes sense for native builds.
|
||||
if (NOT CMAKE_CROSSCOMPILING)
|
||||
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
endif ()
|
||||
# (2) include installed path for GeographicLib.
|
||||
if (NOT APPLE)
|
||||
# Use relative path so that package is relocatable
|
||||
set (CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}")
|
||||
else ()
|
||||
# Need absolute path with MacOSx
|
||||
set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||
if (CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
# Use absolute path with MacOSx
|
||||
set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||
else ()
|
||||
# cmake 2.8.12 introduced a way to make the package relocatable.
|
||||
# See also INSTALL_RPATH property on the tools.
|
||||
set (CMAKE_MACOSX_RPATH ON)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
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 ()
|
||||
include (CheckTypeSize)
|
||||
check_type_size ("long double" LONG_DOUBLE BUILTIN_TYPES_ONLY)
|
||||
set (GEOGRAPHICLIB_HAVE_LONG_DOUBLE ${HAVE_LONG_DOUBLE})
|
||||
include (TestBigEndian)
|
||||
test_big_endian (WORDS_BIGENDIAN)
|
||||
test_big_endian (GEOGRAPHICLIB_WORDS_BIGENDIAN)
|
||||
|
||||
# Make the compiler more picky.
|
||||
include (CheckCXXCompilerFlag)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
# Turn on parallel builds for Visual Studio
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP")
|
||||
else ()
|
||||
set (FLOAT_CONVERSION_FLAG "-Wfloat-conversion")
|
||||
check_cxx_compiler_flag (${FLOAT_CONVERSION_FLAG} FLOAT_CONVERSION)
|
||||
if (NOT FLOAT_CONVERSION)
|
||||
set (FLOAT_CONVERSION_FLAG)
|
||||
endif ()
|
||||
set (CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -Wall -Wextra ${FLOAT_CONVERSION_FLAG}")
|
||||
# g++ 6.0 defaults to -std=gnu++14
|
||||
if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND
|
||||
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) OR
|
||||
# but Boost 1.60 quadmath needs c++14 and not gnu++14
|
||||
GEOGRAPHICLIB_PRECISION EQUAL 4)
|
||||
# check for C++11 support. This flag is *not* propagated to clients
|
||||
# that use GeographicLib. However, this is of no consequence. When
|
||||
# the client code is being compiled (and the GeographicLib headers
|
||||
# being included), work-alike substitutions are used.
|
||||
# The only "deprecated" flag included here is "0x" to activate C++11
|
||||
# with old versions of g++. We'll add "17" when it's available.
|
||||
# Note: C++11 (actually gnu++14) support is turned on by default in
|
||||
# g++ 6.1 and later.
|
||||
foreach (_F 14 11 0x)
|
||||
set (CXX11_FLAG "-std=c++${_F}")
|
||||
set (_T CXX11TEST${_F})
|
||||
check_cxx_compiler_flag (${CXX11_FLAG} ${_T})
|
||||
if (${_T})
|
||||
break ()
|
||||
endif ()
|
||||
unset (CXX11_FLAG)
|
||||
endforeach ()
|
||||
if (CXX11_FLAG)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAG}")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
if (DEVELOPER OR CONVERT_WARNINGS_TO_ERRORS)
|
||||
if (MSVC)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
|
||||
set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /WX")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /WX")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX")
|
||||
else ()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include (CheckCXXSourceCompiles)
|
||||
if (MSVC)
|
||||
set (CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS} /WX")
|
||||
else ()
|
||||
set (CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
endif ()
|
||||
# Check whether the C++11 math function: std::expm1, std::atanh,
|
||||
# etc. are available. This flag is *not* propagated to clients that use
|
||||
# GeographicLib. However, this is of no consequence. When the client
|
||||
# code is being compiled (and the GeographicLib headers being included),
|
||||
# work-alike substitutions are used.
|
||||
check_cxx_source_compiles (
|
||||
"#include <cmath>
|
||||
int main() {
|
||||
int q;
|
||||
return int(std::hypot(3.0, 4.0) + std::expm1(0.5) +
|
||||
std::log1p(2.0) + std::asinh(10.0) +
|
||||
std::atanh(0.8) + std::cbrt(8.0) +
|
||||
std::fma(1.0, 2.0, 3.0) + std::remquo(100.0, 90.0, &q) +
|
||||
std::remainder(100.0, 90.0) + std::copysign(1.0, -0.0)) +
|
||||
std::isfinite(4.0) + std::isnan(0.0);
|
||||
}\n" CXX11_MATH)
|
||||
if (CXX11_MATH)
|
||||
add_definitions (-DGEOGRAPHICLIB_CXX11_MATH=1)
|
||||
else ()
|
||||
add_definitions (-DGEOGRAPHICLIB_CXX11_MATH=0)
|
||||
endif ()
|
||||
|
||||
# Check whether the C++11 static_assert macro is available. 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), a work-alike substitution is
|
||||
# used.
|
||||
check_cxx_source_compiles (
|
||||
"#include <cmath>
|
||||
int main() {
|
||||
static_assert(true, \"static assert test\");
|
||||
return 0;
|
||||
}\n" CXX11_STATIC_ASSERT)
|
||||
if (CXX11_STATIC_ASSERT)
|
||||
add_definitions (-DGEOGRAPHICLIB_HAS_STATIC_ASSERT=1)
|
||||
else ()
|
||||
add_definitions (-DGEOGRAPHICLIB_HAS_STATIC_ASSERT=0)
|
||||
endif ()
|
||||
|
||||
# Set the include directories. Look in ${PROJECT_BINARY_DIR}/include
|
||||
# first because that's where Config.h will be
|
||||
include_directories ("${PROJECT_BINARY_DIR}/include" include)
|
||||
|
||||
#if (USE_BOOST_FOR_EXAMPLES)
|
||||
# # quad precision numbers appeared in Boost 1.54.
|
||||
# find_package (Boost 1.54 COMPONENTS serialization)
|
||||
#elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
|
||||
# if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
|
||||
# find_package (Boost 1.54)
|
||||
# endif ()
|
||||
#endif ()
|
||||
|
||||
set (HIGHPREC_LIBRARIES)
|
||||
if (GEOGRAPHICLIB_PRECISION EQUAL 1)
|
||||
message (WARNING "Compiling with floats which results in poor accuracy")
|
||||
elseif (GEOGRAPHICLIB_PRECISION EQUAL 2)
|
||||
# This is the default
|
||||
elseif (GEOGRAPHICLIB_PRECISION EQUAL 3)
|
||||
if (WIN32)
|
||||
message (WARNING
|
||||
"Cannot support long double on Windows, switching to double")
|
||||
set (GEOGRAPHICLIB_PRECISION 2)
|
||||
endif ()
|
||||
elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
|
||||
if (Boost_FOUND)
|
||||
include_directories ("${Boost_INCLUDE_DIRS}")
|
||||
set (HIGHPREC_LIBRARIES quadmath)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
||||
# Enable Q suffix for quad precision in g++ 4.8 and later
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
|
||||
endif ()
|
||||
# Boost uses std::auto_ptr which is deprecated in C++11. Suppress
|
||||
# ensuing warnings. See also
|
||||
# https://svn.boost.org/trac/boost/ticket/11411
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
|
||||
# Suppress the warnings that boost can spew out, e.g.,
|
||||
# "typedef 'boost_concept_check905' locally defined but not used"
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT HIGHPREC_LIBRARIES)
|
||||
message (WARNING "Cannot support quad precision, switching to double")
|
||||
set (GEOGRAPHICLIB_PRECISION 2)
|
||||
endif ()
|
||||
elseif (GEOGRAPHICLIB_PRECISION EQUAL 5)
|
||||
if (CXX11_MATH)
|
||||
# Install MPFR C++ version 3.6.5 (2016-12-19) or later from
|
||||
# http://www.holoborodko.com/pavel/mpfr and install mpreal.h in the
|
||||
# include directory. NOTE: MPFR C++ is covered by the GPL; be sure
|
||||
# to abide by the terms of this license.
|
||||
#
|
||||
# For Linux, use system versions of mpfr and gmp. For Apple, use
|
||||
# brew install mpfr. Recent versions of mpfr (3.0 or later) work
|
||||
# fine. For Windows, download MPFR-MPIR-x86-x64-MSVC2010.zip from
|
||||
# the MPFR C++ site and unpack in the top-level directory. The
|
||||
# Windows build only works with GEOGRAPHICLIB_LIB_TYPE=STATIC.
|
||||
# NOTE: mpfr, gmp, and mpir are covered by the LGPL; be sure to
|
||||
# abide by the terms of this license.
|
||||
#
|
||||
# Need Visual Studio 12 2013 or later, g++ 4.5 or later; not sure
|
||||
# about clang.
|
||||
if (WIN32)
|
||||
if (MSVC AND NOT MSVC_VERSION LESS 1800)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set (_ARCH x64)
|
||||
else ()
|
||||
set (_ARCH Win32)
|
||||
endif ()
|
||||
include_directories (mpfr_mpir_x86_x64_msvc2010/mpfr
|
||||
mpfr_mpir_x86_x64_msvc2010/mpir/dll/${_ARCH}/Release)
|
||||
# These are C libraries so it's OK to use release versions for
|
||||
# debug builds. Also these work for later versions of Visual
|
||||
# Studio (specifically version 12).
|
||||
link_directories (mpfr_mpir_x86_x64_msvc2010/mpfr/dll/${_ARCH}/Release
|
||||
mpfr_mpir_x86_x64_msvc2010/mpir/dll/${_ARCH}/Release)
|
||||
set (HIGHPREC_LIBRARIES mpfr mpir)
|
||||
# Suppress the myriad of "conditional expression is constant"
|
||||
# warnings
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127")
|
||||
endif ()
|
||||
else ()
|
||||
if (APPLE)
|
||||
include_directories (/usr/local/include)
|
||||
link_directories (/usr/local/lib)
|
||||
endif ()
|
||||
# g++ before 4.5 doesn't work (no explicit cast operator)
|
||||
if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5))
|
||||
set (HIGHPREC_LIBRARIES mpfr gmp)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT HIGHPREC_LIBRARIES)
|
||||
message (WARNING "Cannot support mpfr, switching to double")
|
||||
set (GEOGRAPHICLIB_PRECISION 2)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (APPLE AND APPLE_MULTIPLE_ARCHITECTURES)
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
|
||||
set (CMAKE_OSX_ARCHITECTURES "i386;x86_64")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Create a Config.h to expose system information to the compiler
|
||||
configure_file (
|
||||
include/GeographicLib/Config.h.in
|
||||
include/GeographicLib/Config.h )
|
||||
include/GeographicLib/Config.h
|
||||
@ONLY)
|
||||
|
||||
# The documentation depends on doxygen. Need version 1.8.1.2 or later
|
||||
# for support of greek letters and math symbols.
|
||||
# The documentation depends on doxygen.
|
||||
if (GEOGRAPHICLIB_DOCUMENTATION)
|
||||
set (DOXYGEN_SKIP_DOT ON)
|
||||
find_package (Doxygen 1.8.1.2)
|
||||
if (DOXYGEN_FOUND)
|
||||
execute_process (COMMAND ${DOXYGEN_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (DOXYGEN_VERSION VERSION_LESS 1.4.0)
|
||||
set (DOXYGEN_FOUND FALSE)
|
||||
message (STATUS "Doxygen version found, ${DOXYGEN_VERSION}, is too old")
|
||||
endif ()
|
||||
endif ()
|
||||
# Version 1.8.7 or later needed for …
|
||||
find_package (Doxygen 1.8.7)
|
||||
# For JavaScript documentation
|
||||
find_program (JSDOC jsdoc)
|
||||
# For Python documentation
|
||||
find_program (SPHINX sphinx-build)
|
||||
endif ()
|
||||
|
||||
# The man pages are written as pod files and converted to nroff format,
|
||||
|
|
@ -262,7 +447,9 @@ endif ()
|
|||
# available on an end-user's system, the creation of the final
|
||||
# documentation is therefore only done in "MAINTAINER" mode. The
|
||||
# maintainer runs "make distrib-all" which installs the transformed
|
||||
# documentation files into the source tree.
|
||||
# documentation files into the source tree. Skip Apple here because
|
||||
# man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a
|
||||
# file and there's no simple equivalent for MacOSX
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
find_program (HAVE_POD2MAN pod2man)
|
||||
find_program (HAVE_POD2HTML pod2html)
|
||||
|
|
@ -278,116 +465,54 @@ if (MAINTAINER)
|
|||
add_dependencies (distrib-all distrib-man)
|
||||
endif ()
|
||||
|
||||
# Look for the tool to compile the Matlab interfaces.
|
||||
if (MATLAB_COMPILER)
|
||||
if (WIN32)
|
||||
set (MATLAB_COMPILER_EXT ".bat")
|
||||
else ()
|
||||
set (MATLAB_COMPILER_EXT "")
|
||||
endif ()
|
||||
find_program (MEX "${MATLAB_COMPILER}${MATLAB_COMPILER_EXT}")
|
||||
if (MATLAB_COMPILER MATCHES "mex")
|
||||
get_filename_component (MATLABDIR "${MEX}" REALPATH)
|
||||
get_filename_component (MATLABDIR "${MATLABDIR}" PATH)
|
||||
find_program (MEXEXTPROG "mexext${MATLAB_COMPILER_EXT}"
|
||||
PATHS "${MATLABDIR}")
|
||||
execute_process (COMMAND "${MEXEXTPROG}"
|
||||
OUTPUT_VARIABLE MEXEXT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set (MEXOPTIONS "-largeArrayDims")
|
||||
else ()
|
||||
set (MEXEXT "mex")
|
||||
set (MEXOPTIONS "--mex")
|
||||
endif ()
|
||||
if (NOT MSVC)
|
||||
# mex files are shared objects => require static lib to be built with
|
||||
# position independent code
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif ()
|
||||
if (NOT MEX)
|
||||
message (WARNING
|
||||
"Cannot find Matlab compiler ${MATLAB_COMPILER}${MATLAB_COMPILER_EXT}")
|
||||
elseif (NOT MEXEXT)
|
||||
set (MEX OFF)
|
||||
message (WARNING "Cannot determine extension for Matlab compiled code")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Set a default build type for single-configuration cmake generators if
|
||||
# no build type is set.
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
# Set a default build type for single-configuration cmake generators
|
||||
# if no build type is set.
|
||||
set (CMAKE_BUILD_TYPE Release)
|
||||
endif ()
|
||||
|
||||
# Make the compiler more picky.
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
else ()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||
# 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)
|
||||
if (NOT CXX11TEST1)
|
||||
set (CXX11FLAG "-std=c++0x")
|
||||
check_cxx_compiler_flag (${CXX11FLAG} CXX11TEST2)
|
||||
if (NOT CXX11TEST2)
|
||||
unset (CXX11FLAG)
|
||||
endif ()
|
||||
endif ()
|
||||
if (CXX11FLAG)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11FLAG}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
|
||||
set (CMAKE_OSX_ARCHITECTURES "i386 -arch x86_64")
|
||||
endif ()
|
||||
# Set output directories for Windows so that executables and dlls are
|
||||
# put in the same place
|
||||
if (WIN32)
|
||||
# static libaries
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
||||
# shared libraries
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
||||
# executables and dlls
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
|
||||
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 TransverseMercatorProj)
|
||||
# GeoidEval Gravity 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)
|
||||
#set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity
|
||||
# geographiclib-get-magnetic)
|
||||
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Set the include directories. Look in ${PROJECT_BINARY_DIR}/include
|
||||
# first because that's where Config.h will be
|
||||
include_directories ("${PROJECT_BINARY_DIR}/include" include)
|
||||
|
||||
# The list of subdirectories to process
|
||||
add_subdirectory (src)
|
||||
add_subdirectory (include/GeographicLib)
|
||||
# add_subdirectory (tools)
|
||||
add_subdirectory (tools)
|
||||
add_subdirectory (man)
|
||||
add_subdirectory (doc)
|
||||
add_subdirectory (js)
|
||||
add_subdirectory (matlab)
|
||||
add_subdirectory (python/geographiclib)
|
||||
# if (GEOGRAPHICLIB_PRECISION EQUAL 2)
|
||||
# # The examples assume double precision
|
||||
# add_subdirectory (examples)
|
||||
# endif ()
|
||||
if (BUILD_NETGEOGRAPHICLIB)
|
||||
set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
|
||||
set (NETLIBNAME NETGeographic)
|
||||
add_subdirectory (dotnet/NETGeographicLib)
|
||||
if (GEOGRAPHICLIB_PRECISION EQUAL 2)
|
||||
add_subdirectory (dotnet/examples/ManagedCPP)
|
||||
endif ()
|
||||
endif ()
|
||||
#add_subdirectory (examples)
|
||||
#if (MSVC AND BUILD_NETGEOGRAPHICLIB)
|
||||
# if (GEOGRAPHICLIB_PRECISION EQUAL 2)
|
||||
# set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
|
||||
# set (NETLIBNAME NETGeographic)
|
||||
# add_subdirectory (dotnet/NETGeographicLib)
|
||||
# add_subdirectory (dotnet/examples/ManagedCPP)
|
||||
# else ()
|
||||
# message (WARNING "Build of NETGeographicLib only works with doubles")
|
||||
# endif ()
|
||||
#endif ()
|
||||
add_subdirectory (cmake)
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/tests/CMakeLists.txt)
|
||||
if (DEVELOPER)
|
||||
add_subdirectory (tests)
|
||||
endif ()
|
||||
|
||||
|
|
@ -421,10 +546,10 @@ 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)\$"
|
||||
"${PROJECT_SOURCE_DIR}/(autogen|biblio|js-compress)\\\\.sh\$"
|
||||
"${PROJECT_SOURCE_DIR}/(geodesic-biblio.txt|makefile-admin|[^/]*\\\\.png)\$"
|
||||
"${PROJECT_SOURCE_DIR}/matlab/matlab-.*blurb.txt\$" )
|
||||
"${PROJECT_SOURCE_DIR}/[^/]*\\\\.(xml|html|css|kmz|pdf)\$"
|
||||
"${PROJECT_SOURCE_DIR}/(autogen|biblio)\\\\.sh\$"
|
||||
"${PROJECT_SOURCE_DIR}/(robots.txt|geodesic-biblio.txt|makefile-admin|[^/]*\\\\.png)\$"
|
||||
"${PROJECT_SOURCE_DIR}/matlab/.*blurb.txt\$")
|
||||
set (CPACK_SOURCE_GENERATOR TGZ)
|
||||
|
||||
set (CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
|
||||
|
|
@ -435,31 +560,31 @@ if (WIN32)
|
|||
# The Windows binary packager is NSIS. Set the necessary variables
|
||||
# for this.
|
||||
set (CPACK_NSIS_CONTACT "charles@karney.com")
|
||||
set (CPACK_NSIS_URL_INFO_ABOUT "http://geographiclib.sf.net")
|
||||
set (CPACK_NSIS_URL_INFO_ABOUT "https://geographiclib.sourceforge.io")
|
||||
set (CPACK_NSIS_HELP_LINK "mailto:charles@karney.com")
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
# Hardcode the prefix for Visual Studio 10
|
||||
set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc10-x64")
|
||||
# Hardcode the prefix for Visual Studio 12 2013
|
||||
set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc12-x64")
|
||||
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}-win64")
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} x64 ${PROJECT_VERSION}")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
||||
"${PROJECT_NAME}-x64-${PROJECT_VERSION}")
|
||||
else ()
|
||||
# Hardcode the prefix for Visual Studio 10
|
||||
set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc10")
|
||||
# Hardcode the prefix for Visual Studio 12 2013
|
||||
set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc12-win32")
|
||||
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}-win32")
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} win32 ${PROJECT_VERSION}")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
||||
"${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||
"${PROJECT_NAME}-win32-${PROJECT_VERSION}")
|
||||
endif ()
|
||||
set (CPACK_NSIS_DISPLAY_NAME ${CPACK_NSIS_PACKAGE_NAME})
|
||||
set (CPACK_NSIS_MENU_LINKS
|
||||
"http://geographiclib.sf.net/${PROJECT_VERSION}/index.html"
|
||||
"https://geographiclib.sourceforge.io/${PROJECT_VERSION}/index.html"
|
||||
"Library documentation"
|
||||
"http://geographiclib.sf.net/${PROJECT_VERSION}/utilities.html"
|
||||
"https://geographiclib.sourceforge.io/${PROJECT_VERSION}/utilities.html"
|
||||
"Utilities documentation"
|
||||
"http://geographiclib.sf.net" "GeographicLib home page"
|
||||
"http://sf.net/projects/geographiclib/" "Main project page")
|
||||
"https://geographiclib.sourceforge.io" "GeographicLib home page"
|
||||
"https://sourceforge.net/projects/geographiclib/" "Main project page")
|
||||
set (CPACK_NSIS_MODIFY_PATH ON)
|
||||
elseif (APPLE)
|
||||
# Not tested
|
||||
|
|
@ -510,7 +635,7 @@ if (MAINTAINER)
|
|||
_CPack_Packages/Linux-Source/TGZ.DOS/ &&
|
||||
cd _CPack_Packages/Linux-Source/TGZ.DOS &&
|
||||
find . -type f |
|
||||
egrep '/\(doxyfile.*\\.in|MANIFEST.in|NEWS|AUTHORS|INSTALL|pom\\.xml|dummy.*\\.in|.*\\.\(cpp|hpp|h\\.in|txt|pro|usage|pod|py|m|mac|cmake\\.in|cmake|h|js|c|for|dox|cs|vb|inc|java|html\\.in\)\)$$' |
|
||||
egrep -v '/\(compile|config[^/]*|depcomp|install-sh|missing|[Mm]akefile[^/]*|[^/]*\\.\(ac|am|csproj|eps|kmz|m4|pdf|png|resx|settings|sh|sln|vcproj|vcxproj\)\)$$' |
|
||||
xargs unix2dos -q -k &&
|
||||
find ${CPACK_SOURCE_PACKAGE_FILE_NAME} -type f |
|
||||
zip -q ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.zip -@
|
||||
|
|
@ -518,5 +643,5 @@ if (MAINTAINER)
|
|||
add_dependencies (dist distrib-all)
|
||||
endif ()
|
||||
|
||||
# Add a test target; the tests are in tools.
|
||||
enable_testing ()
|
||||
# The test suite -- split into a separate file because it's rather large.
|
||||
#include (tools/tests.cmake)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
For installation instructions, open
|
||||
|
||||
http://geographiclib.sourceforge.net/html/install.html
|
||||
https://geographiclib.sourceforge.io/html/install.html
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
This license applies to GeographicLib, versions 1.12 and later.
|
||||
The MIT License (MIT); this license applies to GeographicLib,
|
||||
versions 1.12 and later.
|
||||
|
||||
Copyright (c) 2008-2013, Charles Karney
|
||||
Copyright (c) 2008-2017, Charles Karney
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
|
|
|||
|
|
@ -7,34 +7,44 @@ AUTOMAKE_OPTIONS = foreign
|
|||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = src man tools doc include matlab python cmake examples
|
||||
SUBDIRS = src man tools doc js include matlab python cmake examples
|
||||
|
||||
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL pom.xml \
|
||||
Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
|
||||
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL README.md \
|
||||
Makefile.mk CMakeLists.txt windows maxima doc legacy java js dotnet \
|
||||
wrapper
|
||||
|
||||
# Install the pkg-config file; the directory is set using
|
||||
# PKG_INSTALLDIR in configure.ac.
|
||||
pkgconfig_DATA = cmake/geographiclib.pc
|
||||
|
||||
dist-hook:
|
||||
rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
|
||||
find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
|
||||
rm -rf $(distdir)/java/targets ; \
|
||||
find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
|
||||
find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
|
||||
rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
|
||||
$(distdir)/doc/GeographicLib.dox
|
||||
find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
|
||||
rm -rf $(distdir)/java/targets
|
||||
find $(distdir)/java -type f -name '*.class' | xargs rm -rf
|
||||
find $(distdir)/wrapper -mindepth 2 -type d | xargs rm -rf
|
||||
find $(distdir)/wrapper -type f -name '*.o' -o -name '*.mex*' | \
|
||||
xargs rm -f
|
||||
find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
|
||||
find $(distdir)/windows -type f \
|
||||
! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
|
||||
xargs rm -f ; \
|
||||
xargs rm -f
|
||||
find $(distdir) \
|
||||
\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
|
||||
xargs rm -rf ; \
|
||||
echo include Makefile.mk > $(distdir)/Makefile ; \
|
||||
\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
|
||||
xargs rm -rf
|
||||
echo include Makefile.mk > $(distdir)/Makefile
|
||||
sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
|
||||
-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
|
||||
-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
|
||||
-e "s/PATCH .*/PATCH ${GEOGRAPHICLIB_VERSION_PATCH}/" \
|
||||
$(top_srcdir)/include/GeographicLib/Config.h > \
|
||||
$(distdir)/include/GeographicLib/Config.h
|
||||
|
||||
# Custom rules
|
||||
|
||||
all-local: man doc
|
||||
install-data-local: install-doc # install-matlab
|
||||
install-data-local: install-doc
|
||||
|
||||
doc: man
|
||||
$(MAKE) -C doc doc
|
||||
|
|
@ -45,7 +55,4 @@ install-doc:
|
|||
man:
|
||||
$(MAKE) -C man man
|
||||
|
||||
# install-matlab:
|
||||
# $(MAKE) -C matlab install-matlab
|
||||
|
||||
.PHONY: doc install-doc man install-matlab install-python
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -18,24 +18,63 @@
|
|||
# Makefile.am
|
||||
#
|
||||
# Copyright (C) 2009, Francesco P. Lovergine <frankie@debian.org>
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -56,47 +95,110 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = .
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure \
|
||||
$(top_srcdir)/include/GeographicLib/Config-ac.h.in AUTHORS \
|
||||
INSTALL NEWS config.guess config.sub depcomp install-sh \
|
||||
ltmain.sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/include/GeographicLib/Config-ac.h.in AUTHORS \
|
||||
INSTALL NEWS compile config.guess config.sub depcomp \
|
||||
install-sh ltmain.sh missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
|
@ -141,6 +243,7 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
|||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
|
@ -189,6 +292,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
|||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
|
|
@ -207,9 +311,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POD2HTML = @POD2HTML@
|
||||
POD2MAN = @POD2MAN@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
|
@ -258,6 +364,7 @@ mandir = @mandir@
|
|||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
|
|
@ -275,10 +382,15 @@ top_builddir = @top_builddir@
|
|||
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 pom.xml \
|
||||
Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
|
||||
SUBDIRS = src man tools doc js include matlab python cmake examples
|
||||
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL README.md \
|
||||
Makefile.mk CMakeLists.txt windows maxima doc legacy java js dotnet \
|
||||
wrapper
|
||||
|
||||
|
||||
# Install the pkg-config file; the directory is set using
|
||||
# PKG_INSTALLDIR in configure.ac.
|
||||
pkgconfig_DATA = cmake/geographiclib.pc
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
|
|
@ -297,7 +409,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
|
|
@ -318,8 +429,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||
$(am__aclocal_m4_deps):
|
||||
|
||||
include/GeographicLib/Config-ac.h: include/GeographicLib/stamp-h1
|
||||
@if test ! -f $@; then rm -f include/GeographicLib/stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/GeographicLib/stamp-h1; else :; fi
|
||||
@test -f $@ || rm -f include/GeographicLib/stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/GeographicLib/stamp-h1
|
||||
|
||||
include/GeographicLib/stamp-h1: $(top_srcdir)/include/GeographicLib/Config-ac.h.in $(top_builddir)/config.status
|
||||
@rm -f include/GeographicLib/stamp-h1
|
||||
|
|
@ -340,6 +451,27 @@ clean-libtool:
|
|||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
|
|
@ -347,14 +479,13 @@ distclean-libtool:
|
|||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
|
|
@ -375,31 +506,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
|||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
cscopelist-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
|
|
@ -415,12 +528,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -432,15 +540,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -449,18 +553,16 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscope.files: clean-cscope cscopelist-recursive cscopelist
|
||||
|
||||
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
|
|
@ -545,7 +647,7 @@ distdir: $(DISTFILES)
|
|||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
|
|
@ -561,11 +663,17 @@ dist-xz: distdir
|
|||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
|
|
@ -583,7 +691,7 @@ dist dist-all:
|
|||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
|
|
@ -593,22 +701,23 @@ distcheck: dist
|
|||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
|
|
@ -663,9 +772,12 @@ distcleancheck: distclean
|
|||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile all-local
|
||||
all-am: Makefile $(DATA) all-local
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
|
|
@ -718,7 +830,7 @@ info: info-recursive
|
|||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
install-data-am: install-data-local install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
|
|
@ -764,54 +876,59 @@ ps: ps-recursive
|
|||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
|
||||
cscopelist-recursive ctags-recursive install-am install-strip \
|
||||
tags-recursive
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local am--refresh check check-am clean \
|
||||
clean-cscope clean-generic clean-libtool cscope cscopelist \
|
||||
cscopelist-recursive ctags ctags-recursive dist dist-all \
|
||||
dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-data-local install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
|
||||
dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-data-local install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-pkgconfigDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
dist-hook:
|
||||
rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
|
||||
find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
|
||||
rm -rf $(distdir)/java/targets ; \
|
||||
find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
|
||||
find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
|
||||
rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
|
||||
$(distdir)/doc/GeographicLib.dox
|
||||
find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
|
||||
rm -rf $(distdir)/java/targets
|
||||
find $(distdir)/java -type f -name '*.class' | xargs rm -rf
|
||||
find $(distdir)/wrapper -mindepth 2 -type d | xargs rm -rf
|
||||
find $(distdir)/wrapper -type f -name '*.o' -o -name '*.mex*' | \
|
||||
xargs rm -f
|
||||
find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
|
||||
find $(distdir)/windows -type f \
|
||||
! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
|
||||
xargs rm -f ; \
|
||||
xargs rm -f
|
||||
find $(distdir) \
|
||||
\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
|
||||
xargs rm -rf ; \
|
||||
echo include Makefile.mk > $(distdir)/Makefile ; \
|
||||
\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
|
||||
xargs rm -rf
|
||||
echo include Makefile.mk > $(distdir)/Makefile
|
||||
sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
|
||||
-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
|
||||
-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
|
||||
-e "s/PATCH .*/PATCH ${GEOGRAPHICLIB_VERSION_PATCH}/" \
|
||||
$(top_srcdir)/include/GeographicLib/Config.h > \
|
||||
$(distdir)/include/GeographicLib/Config.h
|
||||
|
||||
# Custom rules
|
||||
|
||||
all-local: man doc
|
||||
install-data-local: install-doc # install-matlab
|
||||
install-data-local: install-doc
|
||||
|
||||
doc: man
|
||||
$(MAKE) -C doc doc
|
||||
|
|
@ -822,9 +939,6 @@ install-doc:
|
|||
man:
|
||||
$(MAKE) -C man man
|
||||
|
||||
# install-matlab:
|
||||
# $(MAKE) -C matlab install-matlab
|
||||
|
||||
.PHONY: doc install-doc man install-matlab install-python
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
||||
MAKE := $(MAKE) -f $(MAKEFILE)
|
||||
SUBDIRS = src man tools doc
|
||||
SUBDIRS = src man tools doc js
|
||||
ALLDIRS = include $(SUBDIRS) maxima matlab python cmake
|
||||
|
||||
all: src man tools
|
||||
all: src man tools js
|
||||
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
tools: src
|
||||
install: install-headers install-lib install-tools install-man install-cmake \
|
||||
install-doc install-matlab install-python
|
||||
clean: clean-src clean-tools clean-doc clean-man clean-matlab clean-python
|
||||
install-doc install-js install-matlab install-python
|
||||
clean: clean-src clean-tools clean-doc clean-js clean-man clean-matlab \
|
||||
clean-python
|
||||
|
||||
install-headers:
|
||||
$(MAKE) -C include install
|
||||
|
|
@ -23,6 +24,8 @@ install-cmake:
|
|||
$(MAKE) -C cmake install
|
||||
install-doc: doc
|
||||
$(MAKE) -C doc install
|
||||
install-js: js
|
||||
$(MAKE) -C js install
|
||||
install-man: man
|
||||
$(MAKE) -C man install
|
||||
install-matlab: matlab
|
||||
|
|
@ -35,6 +38,8 @@ clean-tools:
|
|||
$(MAKE) -C tools clean
|
||||
clean-doc:
|
||||
$(MAKE) -C doc clean
|
||||
clean-js:
|
||||
$(MAKE) -C js clean
|
||||
clean-man:
|
||||
$(MAKE) -C man clean
|
||||
clean-matlab: matlab
|
||||
|
|
@ -44,8 +49,8 @@ clean-python: python
|
|||
|
||||
VERSION:=$(shell grep '\bVERSION=' configure | cut -f2 -d\' | head -1)
|
||||
|
||||
.PHONY: all $(SUBDIRS) install \
|
||||
install-headers install-lib install-tools install-cmake install-man \
|
||||
install-matlab install-python \
|
||||
clean clean-src clean-tools clean-doc clean-man clean-matlab \
|
||||
.PHONY: all $(SUBDIRS) install clean \
|
||||
install-headers install-lib install-tools install-man install-cmake \
|
||||
install-doc install-js install-matlab install-python \
|
||||
clean-src clean-tools clean-doc clean-js clean-man clean-matlab \
|
||||
clean-python
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
|||
GeographicLib
|
||||
=============
|
||||
|
||||
A C++ library for geographic projections. The web site for the package
|
||||
is
|
||||
|
||||
> https://geographiclib.sourceforge.io
|
||||
|
||||
The API for the library is documented at
|
||||
|
||||
> https://geographiclib.sourceforge.io/html
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.15 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
|
|
@ -19,24 +20,97 @@ You have another version of autoconf. It may work, but is not guaranteed to.
|
|||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 5
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
|
||||
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.12'
|
||||
[am__api_version='1.15'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.12.2], [],
|
||||
m4_if([$1], [1.15], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
|
|
@ -52,21 +126,19 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.12.2])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.15])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
|
||||
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
|
||||
|
|
@ -106,22 +178,19 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
|||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 10
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
|
|
@ -147,13 +216,12 @@ AC_CONFIG_COMMANDS_PRE(
|
|||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 17
|
||||
|
||||
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
|
|
@ -339,19 +407,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
|||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[{
|
||||
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
||||
# Older Autoconf quotes --file arguments for eval, but not when files
|
||||
# are listed without --file. Let's play safe and only enable the eval
|
||||
# if we detect the quoting.
|
||||
case $CONFIG_FILES in
|
||||
|
|
@ -380,7 +447,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
test -z "$am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
|
|
@ -416,17 +483,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 19
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
||||
m4_define([AC_PROG_CC],
|
||||
m4_defn([AC_PROG_CC])
|
||||
[_AM_PROG_CC_C_O
|
||||
])
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
|
|
@ -439,7 +510,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.62])dnl
|
||||
[AC_PREREQ([2.65])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
|
|
@ -469,8 +540,7 @@ AC_SUBST([CYGPATH_W])
|
|||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[AC_DIAGNOSE([obsolete],
|
||||
[$0: two- and three-arguments forms are deprecated. For more info, see:
|
||||
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
|
||||
[$0: two- and three-arguments forms are deprecated.])
|
||||
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
|
|
@ -503,8 +573,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
|||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
||||
# system "awk" is bad on some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
|
|
@ -524,21 +594,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
|||
[_AM_DEPENDENCIES([OBJC])],
|
||||
[m4_define([AC_PROG_OBJC],
|
||||
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
||||
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
|
||||
dnl but we still cater to Autoconf 2.62.
|
||||
m4_ifdef([AC_PROG_OBJCXX],
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
||||
[_AM_DEPENDENCIES([OBJCXX])],
|
||||
[m4_define([AC_PROG_OBJCXX],
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||
])
|
||||
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
||||
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
|
||||
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||
AC_CONFIG_COMMANDS_PRE(dnl
|
||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||
|
||||
# POSIX will say in a future version that running "rm -f" with no argument
|
||||
# is OK; and we want to be able to make that assumption in our Makefile
|
||||
# recipes. So use an aggressive probe to check that the usage we want is
|
||||
# actually supported "in the wild" to an acceptable degree.
|
||||
# See automake bug#10828.
|
||||
# To make any issue more visible, cause the running configure to be aborted
|
||||
# by default if the 'rm' program in use doesn't match our expectations; the
|
||||
# user can still override this though.
|
||||
if rm -f && rm -fr && rm -rf; then : OK; else
|
||||
cat >&2 <<'END'
|
||||
Oops!
|
||||
|
||||
Your 'rm' program seems unable to run without file operands specified
|
||||
on the command line, even when the '-f' option is present. This is contrary
|
||||
to the behaviour of most rm programs out there, and not conforming with
|
||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||
|
||||
Please tell bug-automake@gnu.org about your system, including the value
|
||||
of your $PATH and any error possibly output before this message. This
|
||||
can help us improve future automake versions.
|
||||
|
||||
END
|
||||
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
||||
echo 'Configuration will proceed anyway, since you have set the' >&2
|
||||
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
||||
echo >&2
|
||||
else
|
||||
cat >&2 <<'END'
|
||||
Aborting the configuration process, to ensure you take notice of the issue.
|
||||
|
||||
You can download and install GNU coreutils to get an 'rm' implementation
|
||||
that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
||||
|
||||
If you want to complete the configuration process using your problematic
|
||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||
to "yes", and re-run configure.
|
||||
|
||||
END
|
||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||
fi
|
||||
fi
|
||||
dnl The trailing newline in this macro's definition is deliberate, for
|
||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
||||
])
|
||||
|
||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||
|
|
@ -547,7 +659,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
|
|||
m4_define([_AC_COMPILER_EXEEXT],
|
||||
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
|
@ -569,20 +680,18 @@ for _am_header in $config_headers :; do
|
|||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
if test x"${install_sh}" != xset; then
|
||||
if test x"${install_sh+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
|
|
@ -592,14 +701,12 @@ if test x"${install_sh}" != xset; then
|
|||
fi
|
||||
AC_SUBST([install_sh])])
|
||||
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
|
|
@ -616,14 +723,12 @@ AC_SUBST([am__leading_dot])])
|
|||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
|
|
@ -651,18 +756,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
|
|
@ -707,14 +808,12 @@ rm -f confinc confmf
|
|||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
|
|
@ -722,11 +821,10 @@ AC_DEFUN([AM_MISSING_PROG],
|
|||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
# Define MISSING if not defined so far and test if it is modern enough.
|
||||
# If it is, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
|
|
@ -739,8 +837,8 @@ if test x"${MISSING+set}" != xset; then
|
|||
esac
|
||||
fi
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
if eval "$MISSING --is-lightweight"; then
|
||||
am_missing_run="$MISSING "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN(['missing' script is too old or missing])
|
||||
|
|
@ -749,14 +847,12 @@ fi
|
|||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
|
|
@ -780,15 +876,77 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
|||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
# _AM_PROG_CC_C_O
|
||||
# ---------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
||||
# to automatically call this.
|
||||
AC_DEFUN([_AM_PROG_CC_C_O],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||
AC_LANG_PUSH([C])dnl
|
||||
AC_CACHE_CHECK(
|
||||
[whether $CC understands -c and -o together],
|
||||
[am_cv_prog_cc_c_o],
|
||||
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
||||
# Make sure it works both with $CC and with simple cc.
|
||||
# Following AC_PROG_CC_C_O, we do the test twice because some
|
||||
# compilers refuse to overwrite an existing .o file with -o,
|
||||
# though they will create one.
|
||||
am_cv_prog_cc_c_o=yes
|
||||
for am_i in 1 2; do
|
||||
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
||||
&& test -f conftest2.$ac_objext; then
|
||||
: OK
|
||||
else
|
||||
am_cv_prog_cc_c_o=no
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm -f core conftest*
|
||||
unset am_i])
|
||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
AC_LANG_POP([C])])
|
||||
|
||||
# For backward compatibility.
|
||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_RUN_LOG(COMMAND)
|
||||
# -------------------
|
||||
# Run COMMAND, save the exit status in ac_status, and log it.
|
||||
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
||||
AC_DEFUN([AM_RUN_LOG],
|
||||
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
|
|
@ -865,13 +1023,71 @@ AC_CONFIG_COMMANDS_PRE(
|
|||
rm -f conftest.file
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
# AM_SILENT_RULES([DEFAULT])
|
||||
# --------------------------
|
||||
# Enable less verbose build rules; with the default set to DEFAULT
|
||||
# ("yes" being less verbose, "no" or empty being verbose).
|
||||
AC_DEFUN([AM_SILENT_RULES],
|
||||
[AC_ARG_ENABLE([silent-rules], [dnl
|
||||
AS_HELP_STRING(
|
||||
[--enable-silent-rules],
|
||||
[less verbose build output (undo: "make V=1")])
|
||||
AS_HELP_STRING(
|
||||
[--disable-silent-rules],
|
||||
[verbose build output (undo: "make V=0")])dnl
|
||||
])
|
||||
case $enable_silent_rules in @%:@ (((
|
||||
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||
no) AM_DEFAULT_VERBOSITY=1;;
|
||||
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
||||
esac
|
||||
dnl
|
||||
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
||||
dnl do not support nested variable expansions.
|
||||
dnl See automake bug#9928 and bug#10237.
|
||||
am_make=${MAKE-make}
|
||||
AC_CACHE_CHECK([whether $am_make supports nested variables],
|
||||
[am_cv_make_support_nested_variables],
|
||||
[if AS_ECHO([['TRUE=$(BAR$(V))
|
||||
BAR0=false
|
||||
BAR1=true
|
||||
V=1
|
||||
am__doit:
|
||||
@$(TRUE)
|
||||
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
|
||||
am_cv_make_support_nested_variables=yes
|
||||
else
|
||||
am_cv_make_support_nested_variables=no
|
||||
fi])
|
||||
if test $am_cv_make_support_nested_variables = yes; then
|
||||
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
||||
AM_V='$(V)'
|
||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||
else
|
||||
AM_V=$AM_DEFAULT_VERBOSITY
|
||||
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
||||
fi
|
||||
AC_SUBST([AM_V])dnl
|
||||
AM_SUBST_NOTMAKE([AM_V])dnl
|
||||
AC_SUBST([AM_DEFAULT_V])dnl
|
||||
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
|
||||
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
||||
AM_BACKSLASH='\'
|
||||
AC_SUBST([AM_BACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
|
|
@ -895,14 +1111,12 @@ fi
|
|||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
|
|
@ -916,14 +1130,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
|
|
@ -937,76 +1149,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
#
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||
# in the wild :-( We should find a proper way to deprecate it ...
|
||||
AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
|
||||
# We'll loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of '-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
[m4_case([$1],
|
||||
[ustar],
|
||||
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
|
||||
# There is notably a 21 bits limit for the UID and the GID. In fact,
|
||||
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
|
||||
# and bug#13588).
|
||||
am_max_uid=2097151 # 2^21 - 1
|
||||
am_max_gid=$am_max_uid
|
||||
# The $UID and $GID variables are not portable, so we need to resort
|
||||
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
|
||||
# below are definitely unexpected, so allow the users to see them
|
||||
# (that is, avoid stderr redirection).
|
||||
am_uid=`id -u || echo unknown`
|
||||
am_gid=`id -g || echo unknown`
|
||||
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
||||
if test $am_uid -le $am_max_uid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
fi
|
||||
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
||||
if test $am_gid -le $am_max_gid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
fi],
|
||||
|
||||
[pax],
|
||||
[],
|
||||
|
||||
[m4_fatal([Unknown tar format])])
|
||||
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
|
||||
# Go ahead even if we have the value already cached. We do so because we
|
||||
# need to set the values for the 'am__tar' and 'am__untar' variables.
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
|
||||
for _am_tool in $_am_tools; do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar; do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
AM_RUN_LOG([cat conftest.dir/file])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
|
@ -1016,3 +1266,4 @@ m4_include([m4/ltoptions.m4])
|
|||
m4_include([m4/ltsugar.m4])
|
||||
m4_include([m4/ltversion.m4])
|
||||
m4_include([m4/lt~obsolete.m4])
|
||||
m4_include([m4/pkg.m4])
|
||||
|
|
|
|||
|
|
@ -8,20 +8,27 @@
|
|||
# geographiclib-config.cmake for the build tree
|
||||
set (PROJECT_ROOT_DIR "${PROJECT_BINARY_DIR}")
|
||||
set (PROJECT_INCLUDE_DIRS
|
||||
"${PROJECT_BINARY_DIR}/include" "${PROJECT_SOURCE_DIR}/include" )
|
||||
"${PROJECT_BINARY_DIR}/include" "${PROJECT_SOURCE_DIR}/include")
|
||||
configure_file (project-config.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake" @ONLY)
|
||||
configure_file (project-config-version.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY)
|
||||
export (TARGETS ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
|
||||
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-depends.cmake")
|
||||
export (TARGETS
|
||||
${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
|
||||
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake")
|
||||
export (TARGETS
|
||||
${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
|
||||
NAMESPACE ${PROJECT_NAME}::
|
||||
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake")
|
||||
|
||||
# geographiclib-config.cmake for the install tree. It's installed in
|
||||
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
|
||||
# path to the root from there. (Note that the whole install tree can
|
||||
# be relocated.)
|
||||
if (COMMON_INSTALL_PATH)
|
||||
set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
|
||||
# Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages
|
||||
# can be installed on a single machine.
|
||||
set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
||||
set (PROJECT_ROOT_DIR "../../..")
|
||||
else ()
|
||||
set (INSTALL_CMAKE_DIR "cmake")
|
||||
|
|
@ -44,12 +51,30 @@ install (FILES
|
|||
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
|
||||
# Make information about the cmake targets (the library and the tools)
|
||||
# available.
|
||||
install (EXPORT depends
|
||||
FILE ${PROJECT_NAME_LOWER}-depends.cmake
|
||||
install (EXPORT targets
|
||||
FILE ${PROJECT_NAME_LOWER}-targets.cmake
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}")
|
||||
install (EXPORT targets
|
||||
NAMESPACE ${PROJECT_NAME}::
|
||||
FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}")
|
||||
|
||||
if (MSVC AND PACKAGE_DEBUG_LIBS)
|
||||
install (FILES
|
||||
"${PROJECT_BINARY_DIR}/cmake/CMakeFiles/Export/cmake/${PROJECT_NAME_LOWER}-depends-debug.cmake"
|
||||
"${PROJECT_BINARY_DIR}/cmake/CMakeFiles/Export/cmake/${PROJECT_NAME_LOWER}-targets-debug.cmake"
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}" CONFIGURATIONS Release)
|
||||
endif ()
|
||||
|
||||
# Support for pkgconfig/geographiclib.pc
|
||||
set (prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set (exec_prefix "\${prefix}")
|
||||
set (libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
|
||||
set (includedir "\${prefix}/include")
|
||||
set (bindir "\${exec_prefix}/bin")
|
||||
set (PACKAGE_NAME "${PROJECT_NAME}")
|
||||
set (PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
|
||||
configure_file (project.pc.in geographiclib.pc @ONLY)
|
||||
install (FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/geographiclib.pc"
|
||||
DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Look for GeographicLib
|
||||
#
|
||||
# Set
|
||||
# GEOGRAPHICLIB_FOUND = TRUE
|
||||
# GeographicLib_FOUND = GEOGRAPHICLIB_FOUND = TRUE
|
||||
# GeographicLib_INCLUDE_DIRS = /usr/local/include
|
||||
# GeographicLib_LIBRARIES = /usr/local/lib/libGeographic.so
|
||||
# GeographicLib_LIBRARY_DIRS = /usr/local/lib
|
||||
|
|
@ -15,17 +15,26 @@ if (GeographicLib_LIBRARIES)
|
|||
get_filename_component (_ROOT_DIR "${GeographicLib_LIBRARY_DIRS}" PATH)
|
||||
set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")
|
||||
set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")
|
||||
unset (_ROOT_DIR)
|
||||
if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")
|
||||
unset (GeographicLib_INCLUDE_DIRS)
|
||||
unset (GeographicLib_LIBRARIES)
|
||||
unset (GeographicLib_LIBRARY_DIRS)
|
||||
unset (GeographicLib_BINARY_DIRS)
|
||||
# On Debian systems the library is in e.g.,
|
||||
# /usr/lib/x86_64-linux-gnu/libGeographic.so
|
||||
# so try stripping another element off _ROOT_DIR
|
||||
get_filename_component (_ROOT_DIR "${_ROOT_DIR}" PATH)
|
||||
set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")
|
||||
set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")
|
||||
if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")
|
||||
unset (GeographicLib_INCLUDE_DIRS)
|
||||
unset (GeographicLib_LIBRARIES)
|
||||
unset (GeographicLib_LIBRARY_DIRS)
|
||||
unset (GeographicLib_BINARY_DIRS)
|
||||
endif ()
|
||||
endif ()
|
||||
unset (_ROOT_DIR)
|
||||
endif ()
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (GeographicLib DEFAULT_MSG
|
||||
GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
|
||||
GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES
|
||||
GeographicLib_INCLUDE_DIRS)
|
||||
mark_as_advanced (GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES
|
||||
GeographicLib_INCLUDE_DIRS)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -19,23 +19,61 @@
|
|||
#
|
||||
# Copyright (C) 2011, Charles Karney <charles@karney.com>
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -56,18 +94,30 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = cmake
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_FILES = geographiclib.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
|
|
@ -75,9 +125,12 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/project.pc.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
|
@ -126,6 +179,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
|||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
|
|
@ -144,9 +198,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POD2HTML = @POD2HTML@
|
||||
POD2MAN = @POD2MAN@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
|
@ -195,6 +251,7 @@ mandir = @mandir@
|
|||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
|
|
@ -229,7 +286,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmake/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu cmake/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
|
|
@ -247,17 +303,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
geographiclib.pc: $(top_builddir)/config.status $(srcdir)/project.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
tags TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
|
@ -394,15 +450,18 @@ uninstall-am:
|
|||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
install:
|
||||
|
|
|
|||
|
|
@ -9,24 +9,28 @@ if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME@")
|
|||
# Check package name (in particular, because of the way cmake finds
|
||||
# package config files, the capitalization could easily be "wrong").
|
||||
# This is necessary to ensure that the automatically generated
|
||||
# variables, e.g., <package>_FOUND, are consistently spelled. Make
|
||||
# this a WARNING, because this is a user error that needs to be fixed.
|
||||
message (WARNING
|
||||
"Mismatched package names: use find_package(@PROJECT_NAME@ ...) instead"
|
||||
" of find_package(${PACKAGE_FIND_NAME} ...)")
|
||||
# variables, e.g., <package>_FOUND, are consistently spelled.
|
||||
set (REASON "package = @PROJECT_NAME@, NOT ${PACKAGE_FIND_NAME}")
|
||||
set (PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
elseif (NOT (APPLE OR CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
|
||||
elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
|
||||
CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
|
||||
# Reject if there's a 32-bit/64-bit mismatch (not necessary with Apple
|
||||
# since a multi-architecture library is built for that platform).
|
||||
message (STATUS
|
||||
"${CMAKE_CURRENT_LIST_FILE} unsuitable because package built with "
|
||||
"sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
|
||||
set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
|
||||
set (PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@")
|
||||
# Reject if there's a mismatch in MSVC compiler versions
|
||||
message (STATUS
|
||||
"${CMAKE_CURRENT_LIST_FILE} unsuitable because package built with "
|
||||
"_MSC_VER = @MSVC_VERSION@")
|
||||
set (REASON "_MSC_VER = @MSVC_VERSION@")
|
||||
set (PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@")
|
||||
# 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@"))
|
||||
# Reject if cross-compiling and there's a mismatch in the target system
|
||||
set (REASON "target = @CMAKE_SYSTEM_NAME@-@CMAKE_SYSTEM_PROCESSOR@")
|
||||
set (PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
elseif (PACKAGE_FIND_VERSION)
|
||||
if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
|
||||
|
|
@ -42,13 +46,20 @@ set (@PROJECT_NAME@_STATIC_FOUND @GEOGRAPHICLIB_STATIC_LIB@)
|
|||
set (@PROJECT_NAME@_NETGeographicLib_FOUND @BUILD_NETGEOGRAPHICLIB@)
|
||||
|
||||
# Check for the components requested. The convention is that
|
||||
# GeographicLib_${comp}_FOUND should be true for all the required
|
||||
# @PROJECT_NAME@_${comp}_FOUND should be true for all the required
|
||||
# components.
|
||||
if (@PROJECT_NAME@_FIND_COMPONENTS)
|
||||
foreach (comp ${@PROJECT_NAME@_FIND_COMPONENTS})
|
||||
if (@PROJECT_NAME@_FIND_REQUIRED_${comp} AND
|
||||
NOT @PROJECT_NAME@_${comp}_FOUND)
|
||||
set (REASON "without ${comp}")
|
||||
set (PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
# If unsuitable, append the reason to the package version so that it's
|
||||
# visible to the user.
|
||||
if (PACKAGE_VERSION_UNSUITABLE)
|
||||
set (PACKAGE_VERSION "${PACKAGE_VERSION} (${REASON})")
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
# @PROJECT_NAME@_STATIC_DEFINITIONS = GEOGRAPHICLIB_SHARED_LIB=0
|
||||
# @PROJECT_NAME@_LIBRARY_DIRS = /usr/local/lib
|
||||
# @PROJECT_NAME@_BINARY_DIRS = /usr/local/bin
|
||||
# @PROJECT_NAME@_VERSION = 1.9 (for example)
|
||||
# @PROJECT_NAME@_VERSION = 1.34 (for example)
|
||||
# @PROJECT_NAME_UPPER@_DATA = /usr/local/share/GeographicLib (for example)
|
||||
# Depending on @PROJECT_NAME@_USE_STATIC_LIBS
|
||||
# @PROJECT_NAME@_LIBRARIES = ${@PROJECT_NAME@_SHARED_LIBRARIES}, if OFF
|
||||
# @PROJECT_NAME@_LIBRARIES = ${@PROJECT_NAME@_STATIC_LIBRARIES}, if ON
|
||||
|
|
@ -17,9 +18,18 @@
|
|||
# @PROJECT_NAME@_DEFINITIONS = ${@PROJECT_NAME@_STATIC_DEFINITIONS}, if ON
|
||||
# If only one of the libraries is provided, then
|
||||
# @PROJECT_NAME@_USE_STATIC_LIBS is ignored.
|
||||
#
|
||||
# For cmake 2.8.11 or later, there's no need to include
|
||||
# include_directories (${GeographicLib_INCLUDE_DIRS})
|
||||
# add_definitions (${GeographicLib_DEFINITIONS})
|
||||
#
|
||||
# The following variables are only relevant if the library has been
|
||||
# compiled with a default precision different from double:
|
||||
# @PROJECT_NAME_UPPER@_PRECISION = the precision of the library (usually 2)
|
||||
# @PROJECT_NAME@_HIGHPREC_LIBRARIES = the libraries need for high precision
|
||||
|
||||
message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
|
||||
set (@PROJECT_NAME@_VERSION "@PROJECT_VERSION@")
|
||||
# @PROJECT_NAME@_VERSION is set by version file
|
||||
message (STATUS
|
||||
"@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}")
|
||||
|
||||
|
|
@ -36,17 +46,23 @@ else ()
|
|||
# current directory.
|
||||
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
|
||||
set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/include")
|
||||
set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/lib")
|
||||
set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/lib@LIB_SUFFIX@")
|
||||
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
|
||||
endif ()
|
||||
message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
|
||||
set (@PROJECT_NAME_UPPER@_DATA "@GEOGRAPHICLIB_DATA@")
|
||||
set (@PROJECT_NAME_UPPER@_PRECISION @GEOGRAPHICLIB_PRECISION@)
|
||||
set (@PROJECT_NAME@_HIGHPREC_LIBRARIES "@HIGHPREC_LIBRARIES@")
|
||||
|
||||
set (@PROJECT_NAME@_SHARED_LIBRARIES @PROJECT_SHARED_LIBRARIES@)
|
||||
set (@PROJECT_NAME@_STATIC_LIBRARIES @PROJECT_STATIC_LIBRARIES@)
|
||||
set (@PROJECT_NAME@_SHARED_DEFINITIONS @PROJECT_SHARED_DEFINITIONS@)
|
||||
set (@PROJECT_NAME@_STATIC_DEFINITIONS @PROJECT_STATIC_DEFINITIONS@)
|
||||
# Read in the exported definition of the library
|
||||
include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
|
||||
include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
|
||||
include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake")
|
||||
|
||||
unset (_ROOT)
|
||||
unset (_DIR)
|
||||
|
||||
if ((NOT @PROJECT_NAME@_SHARED_LIBRARIES) OR
|
||||
(@PROJECT_NAME@_USE_STATIC_LIBS AND @PROJECT_NAME@_STATIC_LIBRARIES))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
bindir=@bindir@
|
||||
|
||||
Name: @PACKAGE_NAME@
|
||||
Description: A library for geographic projections
|
||||
Version: @PACKAGE_VERSION@
|
||||
URL: https://geographiclib.sourceforge.io
|
||||
|
||||
Requires:
|
||||
Libs: -L${libdir} -lGeographic
|
||||
Cflags: -I${includedir}
|
||||
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-06-10'
|
||||
timestamp='2015-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
|
|
@ -22,19 +20,17 @@ timestamp='2012-06-10'
|
|||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
#
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
|
|
@ -54,9 +50,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
case "${UNAME_SYSTEM}" in
|
||||
Linux|GNU|GNU/*)
|
||||
# If the system lacks a compiler, then just pick glibc.
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat <<-EOF > $dummy.c
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
#elif defined(__dietlibc__)
|
||||
LIBC=dietlibc
|
||||
#else
|
||||
LIBC=gnu
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
|
|
@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:OpenBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
|
|
@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
arm:riscos:*:*|arm:RISCOS:*:*)
|
||||
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
||||
echo arm-unknown-riscos
|
||||
exit ;;
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
|
|
@ -560,8 +579,9 @@ EOF
|
|||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
if [ -x /usr/bin/lslpp ] ; then
|
||||
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
||||
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
|
|
@ -801,10 +821,13 @@ EOF
|
|||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
|
|
@ -852,21 +875,21 @@ EOF
|
|||
exit ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
|
|
@ -879,59 +902,54 @@ EOF
|
|||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arc:Linux:*:* | arceb:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
else
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
|
|
@ -950,54 +968,63 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
openrisc*:Linux:*:*)
|
||||
echo or1k-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
or32:Linux:*:* | or1k*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
echo sparc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
echo hppa64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||
esac
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
echo powerpc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc64le:Linux:*:*)
|
||||
echo powerpc64le-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppcle:Linux:*:*)
|
||||
echo powerpcle-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
|
|
@ -1201,6 +1228,9 @@ EOF
|
|||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
x86_64:Haiku:*:*)
|
||||
echo x86_64-unknown-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
|
@ -1227,19 +1257,31 @@ EOF
|
|||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
i386)
|
||||
eval $set_cc_for_build
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR="x86_64"
|
||||
fi
|
||||
fi ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
|
|
@ -1330,157 +1372,6 @@ EOF
|
|||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
# if !defined (ultrix)
|
||||
# include <sys/param.h>
|
||||
# if defined (BSD)
|
||||
# if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
# else
|
||||
# if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
||||
{ echo "$SYSTEM_NAME"; exit; }
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,18 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-04-18'
|
||||
timestamp='2015-01-01'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
@ -26,11 +20,12 @@ timestamp='2012-04-18'
|
|||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
|
@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -123,7 +116,7 @@ esac
|
|||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
|
|
@ -156,7 +149,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
|
@ -259,21 +252,24 @@ case $basic_machine in
|
|||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| fido | fr30 | frv | ft32 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
|
@ -287,23 +283,26 @@ case $basic_machine in
|
|||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| open8 | or1k | or1knd | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
|
|
@ -314,6 +313,7 @@ case $basic_machine in
|
|||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| visium \
|
||||
| we32k \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
|
|
@ -328,7 +328,10 @@ case $basic_machine in
|
|||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
leon|leon[3-9])
|
||||
basic_machine=sparc-$basic_machine
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
|
|
@ -370,13 +373,13 @@ case $basic_machine in
|
|||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
|
|
@ -385,11 +388,13 @@ case $basic_machine in
|
|||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| k1om-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
|
@ -403,18 +408,22 @@ case $basic_machine in
|
|||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| or1k*-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
|
|
@ -432,6 +441,7 @@ case $basic_machine in
|
|||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| visium-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
|
|
@ -769,6 +779,9 @@ case $basic_machine in
|
|||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
leon-*|leon[3-9]-*)
|
||||
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
|
|
@ -788,11 +801,15 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
|
|
@ -820,6 +837,10 @@ case $basic_machine in
|
|||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
moxiebox)
|
||||
basic_machine=moxie-unknown
|
||||
os=-moxiebox
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
|
|
@ -828,7 +849,7 @@ case $basic_machine in
|
|||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
|
|
@ -1004,7 +1025,7 @@ case $basic_machine in
|
|||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
|
|
@ -1019,7 +1040,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
|
@ -1346,29 +1371,29 @@ case $os in
|
|||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
|
@ -1492,9 +1517,6 @@ case $os in
|
|||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
|
|
@ -1543,6 +1565,9 @@ case $basic_machine in
|
|||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
dnl
|
||||
dnl Copyright (C) 2009, Francesco P. Lovergine <frankie@debian.org>
|
||||
|
||||
AC_INIT([GeographicLib],[1.35],[charles@karney.com])
|
||||
AC_INIT([GeographicLib],[1.49],[charles@karney.com])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_PREREQ(2.61)
|
||||
AC_CONFIG_SRCDIR(src/Geodesic.cpp)
|
||||
|
|
@ -9,14 +9,14 @@ AC_CONFIG_MACRO_DIR(m4)
|
|||
AM_INIT_AUTOMAKE
|
||||
|
||||
GEOGRAPHICLIB_VERSION_MAJOR=1
|
||||
GEOGRAPHICLIB_VERSION_MINOR=35
|
||||
GEOGRAPHICLIB_VERSION_MINOR=49
|
||||
GEOGRAPHICLIB_VERSION_PATCH=0
|
||||
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_MAJOR],
|
||||
[$GEOGRAPHICLIB_VERSION_MAJOR],[major version number])
|
||||
[$GEOGRAPHICLIB_VERSION_MAJOR],[major version number])
|
||||
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_MINOR],
|
||||
[$GEOGRAPHICLIB_VERSION_MINOR],[minor version number])
|
||||
[$GEOGRAPHICLIB_VERSION_MINOR],[minor version number])
|
||||
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_PATCH],
|
||||
[$GEOGRAPHICLIB_VERSION_PATCH],[patch number])
|
||||
[$GEOGRAPHICLIB_VERSION_PATCH],[patch number])
|
||||
AC_SUBST(GEOGRAPHICLIB_VERSION_MAJOR)
|
||||
AC_SUBST(GEOGRAPHICLIB_VERSION_MINOR)
|
||||
AC_SUBST(GEOGRAPHICLIB_VERSION_PATCH)
|
||||
|
|
@ -34,7 +34,7 @@ dnl Library code modified: REVISION++
|
|||
dnl Interfaces changed/added/removed: CURRENT++ REVISION=0
|
||||
dnl Interfaces added: AGE++
|
||||
dnl Interfaces removed: AGE=0
|
||||
LT_CURRENT=11
|
||||
LT_CURRENT=18
|
||||
LT_REVISION=2
|
||||
LT_AGE=1
|
||||
AC_SUBST(LT_CURRENT)
|
||||
|
|
@ -47,31 +47,40 @@ AC_PROG_MAKE_SET
|
|||
AC_PROG_INSTALL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_LIBTOOL
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([float.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_INLINE
|
||||
# Checks for long double
|
||||
AC_TYPE_LONG_DOUBLE
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([strtol])
|
||||
AC_SEARCH_LIBS([floor],[m])
|
||||
AC_SEARCH_LIBS([pow],[m])
|
||||
AC_SEARCH_LIBS([sqrt],[m])
|
||||
|
||||
# Check endianness
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Check for doxygen.
|
||||
# Need version 1.8.1.2 or later for greek and math symbols.
|
||||
# Check flags for C++11
|
||||
AX_CHECK_COMPILE_FLAG([-std=c++11],
|
||||
[CXXFLAGS="$CXXFLAGS -std=c++11"],
|
||||
[AX_CHECK_COMPILE_FLAG([-std=c++0x],
|
||||
[CXXFLAGS="$CXXFLAGS -std=c++0x"])])
|
||||
# Check for C++11 math functions
|
||||
AC_MSG_CHECKING([for C++11 math functions])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[#include <cmath>],
|
||||
[int q;
|
||||
return int(std::hypot(3.0, 4.0) + std::expm1(0.5) +
|
||||
std::log1p(2.0) + std::asinh(10.0) +
|
||||
std::atanh(0.8) + std::cbrt(8.0) +
|
||||
std::fma(1.0, 2.0, 3.0) + std::remquo(100.0, 90.0, &q) +
|
||||
std::remainder(100.0, 90.0) + std::copysign(1.0, -0.0)) +
|
||||
std::isfinite(4.0) + std::isnan(0.0);])],
|
||||
[AC_MSG_RESULT([yes]);
|
||||
CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=1"],
|
||||
[AC_MSG_RESULT([no]);
|
||||
CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=0"])
|
||||
|
||||
# Check for doxygen. Version 1.8.7 or later needed for …
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN],
|
||||
[test "$DOXYGEN" && test `"$DOXYGEN" --version |
|
||||
sed 's/^\([[0-9]]\)\.\([[0-9]]\)\./\1.0\2./'` '>' 1.08.1.1])
|
||||
[test "$DOXYGEN" && test `"$DOXYGEN" --version |
|
||||
sed 's/\b\([[0-9]]\)\b/0\1/g'` '>' 01.08.06.99])
|
||||
|
||||
AC_CHECK_PROGS([POD2MAN], [pod2man])
|
||||
AC_CHECK_PROGS([POD2HTML], [pod2html])
|
||||
|
|
@ -87,10 +96,17 @@ src/Makefile
|
|||
include/Makefile
|
||||
tools/Makefile
|
||||
doc/Makefile
|
||||
js/Makefile
|
||||
man/Makefile
|
||||
matlab/Makefile
|
||||
python/Makefile
|
||||
cmake/Makefile
|
||||
examples/Makefile
|
||||
])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
PKG_INSTALLDIR
|
||||
|
||||
AC_CONFIG_FILES([cmake/geographiclib.pc:cmake/project.pc.in])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2012-03-27.16; # UTC
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -27,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
|
@ -56,11 +56,65 @@ EOF
|
|||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
|
|
@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
|
|
@ -85,32 +142,32 @@ if test "$depmode" = hp; then
|
|||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
|
|
@ -133,8 +190,7 @@ gcc3)
|
|||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -142,13 +198,17 @@ gcc3)
|
|||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
|
|
@ -156,15 +216,14 @@ gcc)
|
|||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
|
|
@ -173,15 +232,15 @@ gcc)
|
|||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' "$nl" < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -199,8 +258,7 @@ sgi)
|
|||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -208,7 +266,6 @@ sgi)
|
|||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
|
|
@ -216,19 +273,15 @@ sgi)
|
|||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr "$nl" ' ' >> "$depfile"
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
|
@ -246,9 +299,8 @@ aix)
|
|||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
|
|
@ -261,9 +313,7 @@ aix)
|
|||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -272,65 +322,113 @@ aix)
|
|||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
|
||||
# However on
|
||||
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\':
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
# tcc 0.9.26 (FIXME still under development at the moment of writing)
|
||||
# will emit a similar output, but also prepend the continuation lines
|
||||
# with horizontal tabulation characters.
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form 'foo.o: dependent.h',
|
||||
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
|
||||
< "$tmpdepfile" > "$depfile"
|
||||
sed '
|
||||
s/[ '"$tab"'][ '"$tab"']*/ /g
|
||||
s/^ *//
|
||||
s/ *\\*$//
|
||||
s/^[^:]*: *//
|
||||
/^$/d
|
||||
/:$/d
|
||||
s/$/ :/
|
||||
' < "$tmpdepfile" >> "$depfile"
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -341,9 +439,8 @@ hp2)
|
|||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
|
|
@ -354,8 +451,7 @@ hp2)
|
|||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -365,76 +461,61 @@ hp2)
|
|||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
|
|
@ -445,8 +526,7 @@ msvc7)
|
|||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test "$stat" = 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -472,6 +552,7 @@ $ {
|
|||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -523,13 +604,14 @@ dashmstdout)
|
|||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -582,10 +664,12 @@ makedepend)
|
|||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
|
|
@ -621,10 +705,10 @@ cpp)
|
|||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
|
|
@ -656,15 +740,15 @@ msvisualcpp)
|
|||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
|
|
|
|||
|
|
@ -29,38 +29,105 @@ endif ()
|
|||
|
||||
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-stage)
|
||||
if (DOXYGEN_FOUND)
|
||||
configure_file (doxyfile.in doxyfile)
|
||||
configure_file (doxyfile-c.in doxyfile-c)
|
||||
configure_file (doxyfile-for.in doxyfile-for)
|
||||
configure_file (doxyfile-net.in doxyfile-net)
|
||||
file (GLOB SOURCES
|
||||
set (DOCTARGETS)
|
||||
|
||||
configure_file (GeographicLib.dox.in GeographicLib.dox @ONLY)
|
||||
configure_file (doxyfile.in doxyfile @ONLY)
|
||||
file (GLOB CXXSOURCES
|
||||
../src/[A-Za-z]*.cpp ../include/GeographicLib/[A-Za-z]*.hpp
|
||||
../tools/[A-Za-z]*.cpp ../examples/[A-Za-z]*.cpp
|
||||
../legacy/C/*.[ch] ../legacy/Fortran/*.for ../legacy/Fortran/*.inc
|
||||
../dotnet/NETGeographicLib/*.cpp ../dotnet/NETGeographicLib/*.h
|
||||
../dotnet/examples/CS/*.cs ../dotnet/examples/ManagedCPP/*.cpp
|
||||
../dotnet/examples/VB/*.vb)
|
||||
../examples/[A-Za-z]*.hpp)
|
||||
file (GLOB EXTRA_FILES ../maxima/[A-Za-z]*.mac
|
||||
tmseries30.html geodseries30.html ../LICENSE.txt)
|
||||
file (GLOB FIGURES *.png)
|
||||
file (GLOB FIGURES *.png *.svg *.gif)
|
||||
file (COPY ${EXTRA_FILES} DESTINATION html-stage)
|
||||
add_custom_target (doc ALL
|
||||
add_custom_target (cxxdoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
|
||||
add_dependencies (doc htmlman)
|
||||
add_dependencies (cxxdoc htmlman)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile
|
||||
${CMAKE_CURRENT_BINARY_DIR}/doxyfile-c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/doxyfile-for
|
||||
${CMAKE_CURRENT_BINARY_DIR}/doxyfile-net
|
||||
GeographicLib.dox geodesic-c.dox geodesic-for.dox NETGeographicLib.dox
|
||||
${SOURCES} ${EXTRA_FILES} ${FIGURES} ${HTMLMAN}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/GeographicLib.dox
|
||||
${CXXSOURCES} ${EXTRA_FILES} ${FIGURES} ${HTMLMAN}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory html
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory html-stage html
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile > doxygen.log
|
||||
COMMENT "Generating C++ documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} cxxdoc)
|
||||
|
||||
configure_file (doxyfile-c.in doxyfile-c @ONLY)
|
||||
file (GLOB CSOURCES ../legacy/C/*.[ch])
|
||||
add_custom_target (cdoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/C/index.html)
|
||||
add_dependencies (cdoc cxxdoc)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/C/index.html
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-c geodesic-c.dox ${CSOURCES}
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-c > doxygen-c.log
|
||||
COMMENT "Generating C documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} cdoc)
|
||||
|
||||
configure_file (doxyfile-for.in doxyfile-for @ONLY)
|
||||
file (GLOB FORTRANSOURCES ../legacy/Fortran/*.for ../legacy/Fortran/*.inc)
|
||||
add_custom_target (fortrandoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/Fortran/index.html)
|
||||
add_dependencies (fortrandoc cxxdoc)
|
||||
add_custom_command (OUTPUT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/html/Fortran/index.html
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-for
|
||||
geodesic-for.dox ${FORTRANSOURCES}
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-for > doxygen-for.log
|
||||
COMMENT "Generating Fortran documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} fortrandoc)
|
||||
|
||||
configure_file (doxyfile-net.in doxyfile-net @ONLY)
|
||||
file (GLOB DOTNETSOURCES
|
||||
../dotnet/NETGeographicLib/*.cpp ../dotnet/NETGeographicLib/*.h
|
||||
../dotnet/examples/CS/*.cs ../dotnet/examples/ManagedCPP/*.cpp
|
||||
../dotnet/examples/VB/*.vb)
|
||||
add_custom_target (dotnetdoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/NET/index.html)
|
||||
add_dependencies (dotnetdoc cxxdoc)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/NET/index.html
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-net
|
||||
NETGeographicLib.dox ${DOTNETSOURCES}
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-net > doxygen-net.log
|
||||
COMMENT "Generating html documentation tree")
|
||||
COMMENT "Generating .NET documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} dotnetdoc)
|
||||
|
||||
if (JSDOC)
|
||||
file (GLOB JSSOURCES
|
||||
../js/src/*.js ../js/GeographicLib.md ../js/doc/*.md)
|
||||
add_custom_target (jsdoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/js/index.html)
|
||||
add_dependencies (jsdoc cxxdoc)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/js/index.html
|
||||
DEPENDS ${JSSOURCES}
|
||||
COMMAND ${JSDOC} --verbose -d html/js
|
||||
-u ${PROJECT_SOURCE_DIR}/js/doc
|
||||
-c ${PROJECT_SOURCE_DIR}/js/conf.json
|
||||
-R ${PROJECT_SOURCE_DIR}/js/GeographicLib.md
|
||||
${PROJECT_SOURCE_DIR}/js/src > jsdoc.log
|
||||
COMMENT "Generating JavaScript documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} jsdoc)
|
||||
endif ()
|
||||
|
||||
if (SPHINX)
|
||||
file (GLOB PYTHONSOURCES
|
||||
../python/geographiclib/*.py ../python/doc/*.rst ../python/doc/conf.py)
|
||||
add_custom_target (pythondoc ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/python/index.html)
|
||||
add_dependencies (pythondoc cxxdoc)
|
||||
add_custom_command (OUTPUT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/html/python/index.html
|
||||
DEPENDS ${PYTHONSOURCES}
|
||||
COMMAND ${SPHINX} -v -b html -d python-doctree
|
||||
${PROJECT_SOURCE_DIR}/python/doc html/python > pythondoc.log
|
||||
COMMENT "Generating python documentation tree")
|
||||
set (DOCTARGETS ${DOCTARGETS} pythondoc)
|
||||
endif ()
|
||||
|
||||
add_custom_target (doc ALL)
|
||||
add_dependencies (doc ${DOCTARGETS})
|
||||
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
|
||||
DESTINATION ${INSTALL_DOC_DIR})
|
||||
else ()
|
||||
|
|
@ -74,10 +141,3 @@ else ()
|
|||
${CMAKE_CURRENT_BINARY_DIR}/html/utilities.html
|
||||
DESTINATION ${INSTALL_DOC_DIR}/html)
|
||||
endif ()
|
||||
|
||||
# Finally install the JavaScript files
|
||||
file (GLOB SCRIPTDRIVERS scripts/[A-Za-z]*.html)
|
||||
file (GLOB JSSCRIPTS scripts/GeographicLib/[A-Za-z]*.js)
|
||||
install (FILES ${SCRIPTDRIVERS} DESTINATION ${INSTALL_DOC_DIR}/scripts)
|
||||
install (FILES ${JSSCRIPTS}
|
||||
DESTINATION ${INSTALL_DOC_DIR}/scripts/GeographicLib)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,26 +1,16 @@
|
|||
EXTRAFILES = $(srcdir)/tmseries30.html $(srcdir)/geodseries30.html
|
||||
|
||||
FIGURES = $(srcdir)/gauss-krueger-graticule.png \
|
||||
FIGURES = \
|
||||
$(srcdir)/gauss-krueger-graticule.png \
|
||||
$(srcdir)/thompson-tm-graticule.png \
|
||||
$(srcdir)/gauss-krueger-convergence-scale.png \
|
||||
$(srcdir)/gauss-schreiber-graticule-a.png \
|
||||
$(srcdir)/gauss-krueger-graticule-a.png \
|
||||
$(srcdir)/thompson-tm-graticule-a.png \
|
||||
$(srcdir)/gauss-krueger-error.png \
|
||||
$(srcdir)/meridian-measures.png
|
||||
|
||||
SCRIPTDRIVERS = \
|
||||
$(srcdir)/scripts/geod-calc.html \
|
||||
$(srcdir)/scripts/geod-google.html \
|
||||
$(srcdir)/scripts/geod-google-instructions.html
|
||||
|
||||
JSSCRIPTS = \
|
||||
$(srcdir)/scripts/GeographicLib/Math.js \
|
||||
$(srcdir)/scripts/GeographicLib/Geodesic.js \
|
||||
$(srcdir)/scripts/GeographicLib/GeodesicLine.js \
|
||||
$(srcdir)/scripts/GeographicLib/PolygonArea.js \
|
||||
$(srcdir)/scripts/GeographicLib/DMS.js \
|
||||
$(srcdir)/scripts/GeographicLib/Interface.js
|
||||
$(srcdir)/meridian-measures.png \
|
||||
$(srcdir)/normal-gravity-potential-1.svg \
|
||||
$(srcdir)/vptree.gif
|
||||
|
||||
HPPFILES = \
|
||||
$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
|
||||
|
|
@ -31,14 +21,16 @@ HPPFILES = \
|
|||
$(top_srcdir)/include/GeographicLib/DMS.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Ellipsoid.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/EllipticFunction.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geocentric.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GARS.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeoCoords.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geocentric.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geodesic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicExact.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicLine.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicLineExact.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geohash.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geoid.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Georef.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Gnomonic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/LambertConformalConic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/LocalCartesian.hpp \
|
||||
|
|
@ -58,12 +50,14 @@ ALLSOURCES = \
|
|||
$(top_srcdir)/src/DMS.cpp \
|
||||
$(top_srcdir)/src/Ellipsoid.cpp \
|
||||
$(top_srcdir)/src/EllipticFunction.cpp \
|
||||
$(top_srcdir)/src/Geocentric.cpp \
|
||||
$(top_srcdir)/src/GARS.cpp \
|
||||
$(top_srcdir)/src/GeoCoords.cpp \
|
||||
$(top_srcdir)/src/Geocentric.cpp \
|
||||
$(top_srcdir)/src/Geodesic.cpp \
|
||||
$(top_srcdir)/src/GeodesicLine.cpp \
|
||||
$(top_srcdir)/src/Geohash.cpp \
|
||||
$(top_srcdir)/src/Geoid.cpp \
|
||||
$(top_srcdir)/src/Georef.cpp \
|
||||
$(top_srcdir)/src/Gnomonic.cpp \
|
||||
$(top_srcdir)/src/LambertConformalConic.cpp \
|
||||
$(top_srcdir)/src/LocalCartesian.cpp \
|
||||
|
|
@ -94,20 +88,9 @@ MANPAGES = \
|
|||
../man/Gravity.1.html \
|
||||
../man/MagneticField.1.html \
|
||||
../man/Planimeter.1.html \
|
||||
../man/RhumbSolve.1.html \
|
||||
../man/TransverseMercatorProj.1.html
|
||||
|
||||
LEGACYFILES = \
|
||||
$(top_srcdir)/legacy/C/geodesic.c \
|
||||
$(top_srcdir)/legacy/C/geodesic.h \
|
||||
$(top_srcdir)/legacy/C/direct.c \
|
||||
$(top_srcdir)/legacy/C/inverse.c \
|
||||
$(top_srcdir)/legacy/C/planimeter.c \
|
||||
$(top_srcdir)/legacy/Fortran/geodesic.for \
|
||||
$(top_srcdir)/legacy/Fortran/geodesic.inc \
|
||||
$(top_srcdir)/legacy/Fortran/geoddirect.for \
|
||||
$(top_srcdir)/legacy/Fortran/geodinverse.for \
|
||||
$(top_srcdir)/legacy/Fortran/planimeter.for
|
||||
|
||||
doc: html/index.html
|
||||
|
||||
if HAVE_DOXYGEN
|
||||
|
|
@ -116,21 +99,16 @@ manpages: $(MANPAGES)
|
|||
cp $^ html/
|
||||
touch $@
|
||||
|
||||
html/index.html: manpages doxyfile.in GeographicLib.dox \
|
||||
$(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
|
||||
doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
|
||||
$(LEGACYFILES)
|
||||
html/index.html: manpages doxyfile.in GeographicLib.dox.in \
|
||||
$(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES)
|
||||
cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
|
||||
$(top_srcdir)/LICENSE.txt html/
|
||||
sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
$(srcdir)/GeographicLib.dox.in > GeographicLib.dox
|
||||
sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
-e "s%@PROJECT_BINARY_DIR@%..%g" \
|
||||
-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
$(srcdir)/doxyfile.in | $(DOXYGEN) -
|
||||
sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
$(srcdir)/doxyfile-c.in | $(DOXYGEN) -
|
||||
sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
$(srcdir)/doxyfile-for.in | $(DOXYGEN) -
|
||||
else
|
||||
html/index.html: index.html.in utilities.html.in
|
||||
if test -d html; then rm -rf html/*; else mkdir html; fi
|
||||
|
|
@ -144,17 +122,11 @@ endif
|
|||
maintainer-clean-local:
|
||||
rm -rf html manpages
|
||||
|
||||
htmldir=$(DESTDIR)$(docdir)/html
|
||||
|
||||
install-doc: html/index.html
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html
|
||||
$(INSTALL) -m 644 `dirname $<`/*.* $(DESTDIR)$(docdir)/html
|
||||
-test -f `dirname $<`/C/index.html && \
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html/C && \
|
||||
$(INSTALL) -m 644 `dirname $<`/C/*.* $(DESTDIR)$(docdir)/html/C
|
||||
-test -f `dirname $<`/Fortran/index.html && \
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html/Fortran && \
|
||||
$(INSTALL) -m 644 `dirname $<`/Fortran/*.* \
|
||||
$(DESTDIR)$(docdir)/html/Fortran
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/scripts
|
||||
$(INSTALL) -m 644 $(SCRIPTDRIVERS) $(DESTDIR)$(docdir)/scripts
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/scripts/GeographicLib
|
||||
$(INSTALL) -m 644 $(JSSCRIPTS) $(DESTDIR)$(docdir)/scripts/GeographicLib
|
||||
$(INSTALL) -d $(htmldir)
|
||||
$(INSTALL) -m 644 `dirname $<`/*.* $(htmldir)
|
||||
-test -f `dirname $<`/search/search.js && \
|
||||
$(INSTALL) -d $(htmldir)/search && \
|
||||
$(INSTALL) -m 644 `dirname $<`/search/*.* $(htmldir)/search || true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -14,23 +14,61 @@
|
|||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -51,18 +89,30 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
|
|
@ -70,9 +120,12 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
|
@ -121,6 +174,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
|||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
|
|
@ -139,9 +193,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POD2HTML = @POD2HTML@
|
||||
POD2MAN = @POD2MAN@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
|
@ -178,7 +234,7 @@ host_alias = @host_alias@
|
|||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
htmldir = $(DESTDIR)$(docdir)/html
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
|
|
@ -190,6 +246,7 @@ mandir = @mandir@
|
|||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
|
|
@ -206,27 +263,17 @@ top_build_prefix = @top_build_prefix@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRAFILES = $(srcdir)/tmseries30.html $(srcdir)/geodseries30.html
|
||||
FIGURES = $(srcdir)/gauss-krueger-graticule.png \
|
||||
FIGURES = \
|
||||
$(srcdir)/gauss-krueger-graticule.png \
|
||||
$(srcdir)/thompson-tm-graticule.png \
|
||||
$(srcdir)/gauss-krueger-convergence-scale.png \
|
||||
$(srcdir)/gauss-schreiber-graticule-a.png \
|
||||
$(srcdir)/gauss-krueger-graticule-a.png \
|
||||
$(srcdir)/thompson-tm-graticule-a.png \
|
||||
$(srcdir)/gauss-krueger-error.png \
|
||||
$(srcdir)/meridian-measures.png
|
||||
|
||||
SCRIPTDRIVERS = \
|
||||
$(srcdir)/scripts/geod-calc.html \
|
||||
$(srcdir)/scripts/geod-google.html \
|
||||
$(srcdir)/scripts/geod-google-instructions.html
|
||||
|
||||
JSSCRIPTS = \
|
||||
$(srcdir)/scripts/GeographicLib/Math.js \
|
||||
$(srcdir)/scripts/GeographicLib/Geodesic.js \
|
||||
$(srcdir)/scripts/GeographicLib/GeodesicLine.js \
|
||||
$(srcdir)/scripts/GeographicLib/PolygonArea.js \
|
||||
$(srcdir)/scripts/GeographicLib/DMS.js \
|
||||
$(srcdir)/scripts/GeographicLib/Interface.js
|
||||
$(srcdir)/meridian-measures.png \
|
||||
$(srcdir)/normal-gravity-potential-1.svg \
|
||||
$(srcdir)/vptree.gif
|
||||
|
||||
HPPFILES = \
|
||||
$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
|
||||
|
|
@ -237,14 +284,16 @@ HPPFILES = \
|
|||
$(top_srcdir)/include/GeographicLib/DMS.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Ellipsoid.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/EllipticFunction.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geocentric.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GARS.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeoCoords.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geocentric.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geodesic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicExact.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicLine.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/GeodesicLineExact.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geohash.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Geoid.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Georef.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/Gnomonic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/LambertConformalConic.hpp \
|
||||
$(top_srcdir)/include/GeographicLib/LocalCartesian.hpp \
|
||||
|
|
@ -264,12 +313,14 @@ ALLSOURCES = \
|
|||
$(top_srcdir)/src/DMS.cpp \
|
||||
$(top_srcdir)/src/Ellipsoid.cpp \
|
||||
$(top_srcdir)/src/EllipticFunction.cpp \
|
||||
$(top_srcdir)/src/Geocentric.cpp \
|
||||
$(top_srcdir)/src/GARS.cpp \
|
||||
$(top_srcdir)/src/GeoCoords.cpp \
|
||||
$(top_srcdir)/src/Geocentric.cpp \
|
||||
$(top_srcdir)/src/Geodesic.cpp \
|
||||
$(top_srcdir)/src/GeodesicLine.cpp \
|
||||
$(top_srcdir)/src/Geohash.cpp \
|
||||
$(top_srcdir)/src/Geoid.cpp \
|
||||
$(top_srcdir)/src/Georef.cpp \
|
||||
$(top_srcdir)/src/Gnomonic.cpp \
|
||||
$(top_srcdir)/src/LambertConformalConic.cpp \
|
||||
$(top_srcdir)/src/LocalCartesian.cpp \
|
||||
|
|
@ -300,20 +351,9 @@ MANPAGES = \
|
|||
../man/Gravity.1.html \
|
||||
../man/MagneticField.1.html \
|
||||
../man/Planimeter.1.html \
|
||||
../man/RhumbSolve.1.html \
|
||||
../man/TransverseMercatorProj.1.html
|
||||
|
||||
LEGACYFILES = \
|
||||
$(top_srcdir)/legacy/C/geodesic.c \
|
||||
$(top_srcdir)/legacy/C/geodesic.h \
|
||||
$(top_srcdir)/legacy/C/direct.c \
|
||||
$(top_srcdir)/legacy/C/inverse.c \
|
||||
$(top_srcdir)/legacy/C/planimeter.c \
|
||||
$(top_srcdir)/legacy/Fortran/geodesic.for \
|
||||
$(top_srcdir)/legacy/Fortran/geodesic.inc \
|
||||
$(top_srcdir)/legacy/Fortran/geoddirect.for \
|
||||
$(top_srcdir)/legacy/Fortran/geodinverse.for \
|
||||
$(top_srcdir)/legacy/Fortran/planimeter.for
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
|
@ -329,7 +369,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
|
|
@ -353,11 +392,9 @@ mostlyclean-libtool:
|
|||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
tags TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
|
@ -496,16 +533,19 @@ uninstall-am:
|
|||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-local mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-local mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
doc: html/index.html
|
||||
|
|
@ -515,21 +555,16 @@ doc: html/index.html
|
|||
@HAVE_DOXYGEN_TRUE@ cp $^ html/
|
||||
@HAVE_DOXYGEN_TRUE@ touch $@
|
||||
|
||||
@HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox \
|
||||
@HAVE_DOXYGEN_TRUE@ $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
|
||||
@HAVE_DOXYGEN_TRUE@ doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
|
||||
@HAVE_DOXYGEN_TRUE@ $(LEGACYFILES)
|
||||
@HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox.in \
|
||||
@HAVE_DOXYGEN_TRUE@ $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES)
|
||||
@HAVE_DOXYGEN_TRUE@ cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
|
||||
@HAVE_DOXYGEN_TRUE@ $(top_srcdir)/LICENSE.txt html/
|
||||
@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ $(srcdir)/GeographicLib.dox.in > GeographicLib.dox
|
||||
@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_BINARY_DIR@%..%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile.in | $(DOXYGEN) -
|
||||
@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile-c.in | $(DOXYGEN) -
|
||||
@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
|
||||
@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile-for.in | $(DOXYGEN) -
|
||||
@HAVE_DOXYGEN_FALSE@html/index.html: index.html.in utilities.html.in
|
||||
@HAVE_DOXYGEN_FALSE@ if test -d html; then rm -rf html/*; else mkdir html; fi
|
||||
@HAVE_DOXYGEN_FALSE@ cp $(top_srcdir)/LICENSE.txt html/
|
||||
|
|
@ -542,19 +577,11 @@ maintainer-clean-local:
|
|||
rm -rf html manpages
|
||||
|
||||
install-doc: html/index.html
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html
|
||||
$(INSTALL) -m 644 `dirname $<`/*.* $(DESTDIR)$(docdir)/html
|
||||
-test -f `dirname $<`/C/index.html && \
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html/C && \
|
||||
$(INSTALL) -m 644 `dirname $<`/C/*.* $(DESTDIR)$(docdir)/html/C
|
||||
-test -f `dirname $<`/Fortran/index.html && \
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/html/Fortran && \
|
||||
$(INSTALL) -m 644 `dirname $<`/Fortran/*.* \
|
||||
$(DESTDIR)$(docdir)/html/Fortran
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/scripts
|
||||
$(INSTALL) -m 644 $(SCRIPTDRIVERS) $(DESTDIR)$(docdir)/scripts
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/scripts/GeographicLib
|
||||
$(INSTALL) -m 644 $(JSSCRIPTS) $(DESTDIR)$(docdir)/scripts/GeographicLib
|
||||
$(INSTALL) -d $(htmldir)
|
||||
$(INSTALL) -m 644 `dirname $<`/*.* $(htmldir)
|
||||
-test -f `dirname $<`/search/search.js && \
|
||||
$(INSTALL) -d $(htmldir)/search && \
|
||||
$(INSTALL) -m 644 `dirname $<`/search/*.* $(htmldir)/search || true
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
SCRIPTDRIVERS = $(wildcard scripts/[A-Za-z]*.html)
|
||||
JSSCRIPTS = $(wildcard scripts/GeographicLib/[A-Za-z]*.js)
|
||||
|
||||
VERSION:=$(shell grep '\bVERSION=' ../configure | cut -f2 -d\' | head -1)
|
||||
|
||||
doc: html/index.html
|
||||
|
|
@ -16,15 +13,10 @@ html/index.html: index.html.in utilities.html.in
|
|||
PREFIX = /usr/local
|
||||
DEST = $(PREFIX)/share/doc/GeographicLib
|
||||
DOCDEST = $(DEST)/html
|
||||
SCRIPTDEST = $(DEST)/scripts
|
||||
INSTALL = install -b
|
||||
|
||||
install: html/index.html
|
||||
test -d $(DOCDEST) || mkdir -p $(DOCDEST)
|
||||
$(INSTALL) -m 644 html/* $(DOCDEST)/
|
||||
test -d $(SCRIPTDEST)/GeographicLib || \
|
||||
mkdir -p $(SCRIPTDEST)/GeographicLib
|
||||
$(INSTALL) -m 644 $(SCRIPTDRIVERS) $(SCRIPTDEST)/
|
||||
$(INSTALL) -m 644 $(JSSCRIPTS) $(SCRIPTDEST)/GeographicLib/
|
||||
|
||||
.PHONY: doc install clean
|
||||
|
|
|
|||
|
|
@ -5,16 +5,20 @@
|
|||
*
|
||||
* Written by Scott Heiman <mrmtdew2@outlook.com> and licensed under the
|
||||
* MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
/**
|
||||
\mainpage NETGeographicLib library
|
||||
\author Scott Heiman (mrmtdew2@outlook.com)
|
||||
\version 1.35
|
||||
\date 2014-03-13
|
||||
\version 1.49
|
||||
\date 2017-10-05
|
||||
|
||||
\section abstract Abstract
|
||||
The documentation for other versions is available at
|
||||
<tt>https://geographiclib.sourceforge.io/m.nn/NET</tt> for versions numbers
|
||||
<tt>m.nn</tt> ≥ 1.33.
|
||||
|
||||
\section abstract-net Abstract
|
||||
|
||||
%NETGeographicLib is a .NET wrapper for GeographicLib. It allows
|
||||
.NET developers to access GeographicLib classes within C#, Visual
|
||||
|
|
@ -25,15 +29,15 @@ of the GeographicLib software. It is a container that provides interfaces
|
|||
to the GeographicLib classes. GeographicLib and NETGeographicLib is an
|
||||
integrated product.
|
||||
|
||||
The NETGeographic project in the GeographicLib-vc10.sln file located in
|
||||
\<install folder\>/GeographicLib-1.35/windows will create the NETGeographicLib
|
||||
DLL. The source code for NETGeographicLib is located in
|
||||
\<install folder\>/GeographicLib-1.35/dotnet/NETGeographicLib. NETGeographicLib
|
||||
is not available for older versions of Microsoft Visual Studio.
|
||||
The NETGeographic solutions and C++ projects are located in the
|
||||
\<install\>/windows folder. The C# Projections projects are located in
|
||||
the \<install\>/dotnet/Projections folder. Solution files have been provided
|
||||
for VS 2010 and VS 2013 NETGeographicLib is not available for older
|
||||
versions of Microsoft Visual Studio.
|
||||
|
||||
NETGeographicLib has been tested with C#, Managed C++, and Visual Basic.
|
||||
Sample code snippets can be found in
|
||||
\<install folder\>/GeographicLib-1.35/dotnet/examples.
|
||||
\<install folder\>/GeographicLib-1.49/dotnet/examples.
|
||||
|
||||
\section differences Differences between NETGeographicLib and GeographicLib
|
||||
|
||||
|
|
@ -41,14 +45,15 @@ The NETGeographicLib class names are identical to the GeographicLib class names.
|
|||
All NETGeographicLib classes are in the NETGeographicLib namespace.
|
||||
|
||||
NETGeographicLib exposes most of the GeographicLib classes. The exceptions
|
||||
are SphericalEngine, GeographicLib::Math, and GeographicLib::Utility. The
|
||||
are SphericalEngine, GeographicLib::Math, and most of GeographicLib::Utility. The
|
||||
SphericalEngine class is a template class which (according to the comments in
|
||||
the SphericalEngine.h file) is not usually accessible to developers. The
|
||||
GeographicLib::Math class contains several specialized functions required by
|
||||
GeographicLib classes. They have limited use outside GeographicLib. This class
|
||||
may be exposed in a future release if there is demand for it. The functions
|
||||
provided by GeographicLib::Utility duplicate functions provided by existing .NET
|
||||
controls (DateTime).
|
||||
controls (DateTime). The GeographicLib::Utility::fractionalyear function is
|
||||
available to .NET programmers by calling NETGeographicLib::Utility::FractionalYear.
|
||||
|
||||
The SphericalCoefficients class replaces the SphericalEngine::coeff class.
|
||||
|
||||
|
|
@ -59,7 +64,10 @@ in the header files contain a section labeled "INTERFACE DIFFERENCES" that detai
|
|||
the differences between the NETGeographicLib interfaces and the GeographicLib
|
||||
interfaces. The differences are summarized in the text that follows.
|
||||
|
||||
Default values for function parameters are not supported in .NET.
|
||||
Default values for function parameters are not supported in .NET. If
|
||||
the documentation refers to a default value for a parameter, it applies
|
||||
only to GeographicLib. However, such a "default" value often provides a
|
||||
reasonable choice for this parameter.
|
||||
|
||||
Several GeographicLib class functions accept or return a "capabilities mask" as
|
||||
an unsigned integer. The NETGeographicLib classes accept and return the capabilities
|
||||
|
|
@ -135,7 +143,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.35/dotnet/Projections. The sample
|
||||
\<install folder\>/GeographicLib-1.49/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.
|
||||
|
||||
|
|
@ -153,12 +161,13 @@ The following table lists the source code that demonstrates specific classes.
|
|||
<TR><TD>GravityPanel.cs</TD><TD>NormalGravity, GravityModel, GravityCircle</TD></TR>
|
||||
<TR><TD>LocalCartesianPanel.cs</TD><TD>LocalCartesian</TD></TR>
|
||||
<TR><TD>MagneticPanel.cs</TD><TD>MagneticModel, MagneticCircle</TD></TR>
|
||||
<TR><TD>MiscPanel.cs</TD><TD>DMS, Geohash</TD></TR>
|
||||
<TR><TD>MiscPanel.cs</TD><TD>DMS, Geohash, GARS, Georef</TD></TR>
|
||||
<TR><TD>PolarStereoPanel.cs</TD><TD>PolarStereographic</TD></TR>
|
||||
<TR><TD>PolyPanel.cs</TD><TD>PolygonArea</TD></TR>
|
||||
<TR><TD>ProjectionsPanel.cs</TD><TD>AzimuthalEquidistant, CassiniSoldner, Gnomonic</TD></TR>
|
||||
<TR><TD>SphericalHarmonicsPanel.cs</TD><TD>SphericalHarmonic, SphericalHarmonic1, SphericalHarmonic2, CircularEngine, SphericalCoefficients</TD></TR>
|
||||
<TR><TD>TypeIIIProjPanel.cs</TD><TD>UTMUPS, MGRS, OSGB</TD></TR>
|
||||
<TR><TD>RhumbPanel.cs</TD><TD>Rhumb, RhumbLine</TD></TR>
|
||||
</TABLE>
|
||||
</center>
|
||||
|
||||
|
|
@ -174,7 +183,7 @@ two ways:
|
|||
application. You can build %GeographicLib as a shared library using
|
||||
<code>-D GEOGRAPHICLIB_LIB_TYPE=SHARED</code> or <code>BOTH</code>.
|
||||
- you have installed %GeographicLib using one of the binary installers (see
|
||||
\ref windowsbin "Using a binary installer for Windows" in the
|
||||
\ref binaryinstwin "Using a binary installer for Windows" in the
|
||||
%GeographicLib documentation). In this case, you are restricted to using
|
||||
Visual Studio 10.
|
||||
|
||||
|
|
|
|||
|
|
@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
|
|||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||
# determine which symbols to keep in memory and which to flush to disk.
|
||||
# When the cache is full, less often used symbols will be written to disk.
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
|
||||
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
|
||||
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
|
||||
# their name and scope. Since this can be an expensive process and often the
|
||||
# same symbol appear multiple times in the code, doxygen keeps a cache of
|
||||
# pre-resolved symbols. If the cache is too small doxygen will become slower.
|
||||
# If the cache is too large, memory is wasted. The cache size is given by this
|
||||
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
|
|
@ -1200,7 +1186,7 @@ USE_MATHJAX = NO
|
|||
# However, it is strongly recommended to install a local
|
||||
# copy of MathJax from http://www.mathjax.org before deployment.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
|
||||
# names that should be enabled during MathJax rendering.
|
||||
|
|
@ -1215,7 +1201,7 @@ MATHJAX_EXTENSIONS =
|
|||
# typically be disabled. For large projects the javascript based search engine
|
||||
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a PHP enabled web server instead of at the web client
|
||||
|
|
@ -1412,18 +1398,6 @@ GENERATE_XML = NO
|
|||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
# and cross-referencing information) to the XML output. Note that
|
||||
|
|
|
|||
|
|
@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
|
|||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||
# determine which symbols to keep in memory and which to flush to disk.
|
||||
# When the cache is full, less often used symbols will be written to disk.
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
|
||||
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
|
||||
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
|
||||
# their name and scope. Since this can be an expensive process and often the
|
||||
# same symbol appear multiple times in the code, doxygen keeps a cache of
|
||||
# pre-resolved symbols. If the cache is too small doxygen will become slower.
|
||||
# If the cache is too large, memory is wasted. The cache size is given by this
|
||||
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
|
|
@ -680,8 +666,7 @@ INPUT_ENCODING = UTF-8
|
|||
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
|
||||
# *.f90 *.f *.for *.vhd *.vhdl
|
||||
|
||||
FILE_PATTERNS = *.for \
|
||||
*.inc
|
||||
FILE_PATTERNS = geod*.for planimeter.for geodesic.inc
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
|
|
@ -1200,7 +1185,7 @@ USE_MATHJAX = NO
|
|||
# However, it is strongly recommended to install a local
|
||||
# copy of MathJax from http://www.mathjax.org before deployment.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
|
||||
# names that should be enabled during MathJax rendering.
|
||||
|
|
@ -1215,7 +1200,7 @@ MATHJAX_EXTENSIONS =
|
|||
# typically be disabled. For large projects the javascript based search engine
|
||||
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a PHP enabled web server instead of at the web client
|
||||
|
|
@ -1412,18 +1397,6 @@ GENERATE_XML = NO
|
|||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
# and cross-referencing information) to the XML output. Note that
|
||||
|
|
|
|||
|
|
@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
|
|||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||
# determine which symbols to keep in memory and which to flush to disk.
|
||||
# When the cache is full, less often used symbols will be written to disk.
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
|
||||
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
|
||||
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
|
||||
# their name and scope. Since this can be an expensive process and often the
|
||||
# same symbol appear multiple times in the code, doxygen keeps a cache of
|
||||
# pre-resolved symbols. If the cache is too small doxygen will become slower.
|
||||
# If the cache is too large, memory is wasted. The cache size is given by this
|
||||
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
|
|
@ -1201,7 +1187,7 @@ USE_MATHJAX = YES
|
|||
# However, it is strongly recommended to install a local
|
||||
# copy of MathJax from http://www.mathjax.org before deployment.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
|
||||
# names that should be enabled during MathJax rendering.
|
||||
|
|
@ -1216,7 +1202,7 @@ MATHJAX_EXTENSIONS =
|
|||
# typically be disabled. For large projects the javascript based search engine
|
||||
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a PHP enabled web server instead of at the web client
|
||||
|
|
@ -1413,18 +1399,6 @@ GENERATE_XML = NO
|
|||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
# and cross-referencing information) to the XML output. Note that
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/
|
|||
# definition is used. Otherwise one should specify the include paths that
|
||||
# are normally passed to the compiler using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include/
|
||||
STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include/ \
|
||||
@PROJECT_SOURCE_DIR@/examples/
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful if your file system
|
||||
|
|
@ -324,30 +325,16 @@ INLINE_SIMPLE_STRUCTS = NO
|
|||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||
# determine which symbols to keep in memory and which to flush to disk.
|
||||
# When the cache is full, less often used symbols will be written to disk.
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
|
||||
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
|
||||
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
|
||||
# their name and scope. Since this can be an expensive process and often the
|
||||
# same symbol appear multiple times in the code, doxygen keeps a cache of
|
||||
# pre-resolved symbols. If the cache is too small doxygen will become slower.
|
||||
# If the cache is too large, memory is wasted. The cache size is given by this
|
||||
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols.
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
|
|
@ -664,7 +651,8 @@ WARN_LOGFILE =
|
|||
INPUT = @PROJECT_SOURCE_DIR@/src \
|
||||
@PROJECT_SOURCE_DIR@/include/GeographicLib \
|
||||
@PROJECT_SOURCE_DIR@/tools \
|
||||
@PROJECT_SOURCE_DIR@/doc/GeographicLib.dox
|
||||
@PROJECT_BINARY_DIR@/doc/GeographicLib.dox \
|
||||
@PROJECT_SOURCE_DIR@/examples/JacobiConformal.hpp
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
|
@ -1202,7 +1190,7 @@ USE_MATHJAX = YES
|
|||
# However, it is strongly recommended to install a local
|
||||
# copy of MathJax from http://www.mathjax.org before deployment.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
|
||||
# names that should be enabled during MathJax rendering.
|
||||
|
|
@ -1217,7 +1205,7 @@ MATHJAX_EXTENSIONS =
|
|||
# typically be disabled. For large projects the javascript based search engine
|
||||
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a PHP enabled web server instead of at the web client
|
||||
|
|
@ -1414,18 +1402,6 @@ GENERATE_XML = NO
|
|||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
# and cross-referencing information) to the XML output. Note that
|
||||
|
|
|
|||
|
|
@ -5,49 +5,62 @@
|
|||
*
|
||||
* Written by Charles Karney <charles@karney.com> and licensed under the
|
||||
* MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
/**
|
||||
\mainpage Geodesic routines implemented in C
|
||||
\author Charles F. F. Karney (charles@karney.com)
|
||||
\version 1.32
|
||||
\version 1.49
|
||||
|
||||
\section abstract Abstract
|
||||
The documentation for other versions is available at
|
||||
<tt>https://geographiclib.sourceforge.io/m.nn/C</tt> for versions numbers
|
||||
<tt>m.nn</tt> ≥ 1.28.
|
||||
|
||||
This is a C implementation of the geodesic algorithms from <a
|
||||
href="http://geographiclib.sf.net">GeographicLib</a>. This is a
|
||||
self-contained library (requiring only the standard C math library)
|
||||
\section abstract-c Abstract
|
||||
|
||||
This is a C implementation of the geodesic algorithms from
|
||||
<a href="https://geographiclib.sourceforge.io">GeographicLib</a>. This
|
||||
is a self-contained library (requiring only the standard C math library)
|
||||
which makes it easy to do geodesic computations for an ellipsoid of
|
||||
revolution in a C program. It uses ANSI C as described in
|
||||
B. W. Kernigan and D. M. Ritchie, The C Programming Language, 2nd
|
||||
Ed. (Prentice Hall, 1988), and so should compile correctly with just
|
||||
about any C compiler.
|
||||
revolution in a C program. It is included with version 4.9.0 of
|
||||
<a href="http://proj4.org">proj.4</a> and later.
|
||||
It uses ANSI C as described in B. W. Kernigan and D. M. Ritchie, The C
|
||||
Programming Language, 2nd Ed. (Prentice Hall, 1988), and so should
|
||||
compile correctly with just about any C compiler. However, the C99 math
|
||||
functions are used if they are available.
|
||||
|
||||
\section download Downloading the source
|
||||
\section download-c Downloading the source
|
||||
|
||||
The C library is part of %GeographicLib which available for download at
|
||||
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.32.tar.gz">
|
||||
GeographicLib-1.32.tar.gz</a>
|
||||
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.32.zip">
|
||||
GeographicLib-1.32.zip</a>
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.49.tar.gz">
|
||||
GeographicLib-1.49.tar.gz</a>
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.49.zip">
|
||||
GeographicLib-1.49.zip</a>
|
||||
.
|
||||
as either a compressed tar file (tar.gz) or a zip file. After unpacking
|
||||
the source, the C library can be found in GeographicLib-1.32/legacy/C.
|
||||
the source, the C library can be found in the directory <tt>legacy/C</tt>.
|
||||
The library consists of two files geodesic.c and geodesic.h.
|
||||
|
||||
The library is also included as part of
|
||||
<a href="http://trac.osgeo.org/proj/">proj.4</a> starting with version
|
||||
4.9.0, where is used as the computational backend for
|
||||
<a href="http://trac.osgeo.org/proj/wiki/man_geod">geod(1)</a>.
|
||||
<a href="http://proj.org">proj.4</a> starting with
|
||||
version 4.9.0, where it is used as the computational backend for
|
||||
<a href="https://github.com/OSGeo/proj.4/wiki/Mangeod">geod(1)</a>.
|
||||
Instructions for how to use the library via proj.4 are given below.
|
||||
|
||||
\section doc Library documentation
|
||||
Licensed under the
|
||||
<a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>; see
|
||||
<a href="https://geographiclib.sourceforge.io/html/LICENSE.txt">LICENSE.txt</a>.
|
||||
|
||||
The interface to the library is documented via doxygen in the header
|
||||
file. To access this, see geodesic.h.
|
||||
\section doc-c Library documentation
|
||||
|
||||
\section samples Sample programs
|
||||
Here is the
|
||||
\link geodesic.h <i>application programming interface</i>\endlink
|
||||
for the library (this is just the documentation for the header file,
|
||||
geodesic.h). See also the documentation on the structures geod_geodesic,
|
||||
geod_geodesicline, and geod_polygon.
|
||||
|
||||
\section samples-c Sample programs
|
||||
|
||||
Also included are 3 small test programs:
|
||||
- direct.c is a simple command line utility for solving the
|
||||
|
|
@ -68,6 +81,7 @@ mkdir BUILD
|
|||
cd BUILD
|
||||
cmake ..
|
||||
make
|
||||
make test
|
||||
echo 30 0 29.5 179.5 | ./inverse \endverbatim
|
||||
|
||||
Alternatively, if you have proj.4 installed, you can compile and link
|
||||
|
|
@ -81,38 +95,158 @@ cc -c -I/usr/local/include inverse.c
|
|||
cc -o inverse inverse.o -lproj -L/usr/local/lib -Wl,-rpath=/usr/local/lib
|
||||
echo 30 0 29.5 179.5 | ./inverse \endverbatim
|
||||
|
||||
\section library Using the library
|
||||
\section library-c Using the library
|
||||
|
||||
- Put @verbatim
|
||||
#include "geodesic.h" @endverbatim
|
||||
- Put @code{.c}
|
||||
#include "geodesic.h"
|
||||
@endcode
|
||||
in your source code. If you are using the library via proj.4, change
|
||||
this to @verbatim
|
||||
#include <geodesic.h> @endverbatim
|
||||
- make calls to the geodesic routines from your code. The interface to
|
||||
this to @code{.c}
|
||||
#include <geodesic.h>
|
||||
@endcode
|
||||
- Make calls to the geodesic routines from your code. The interface to
|
||||
the library is documented in geodesic.h.
|
||||
- Compile and link as described above.
|
||||
- If linking with proj.4, you might want to check that the version of
|
||||
proj.4 contains the geodesic routines. You can do this with @code{.c}
|
||||
#include <proj_api.h>
|
||||
#if PJ_VERSION >= 490
|
||||
#include <geodesic.h>
|
||||
#endif
|
||||
...
|
||||
@endcode
|
||||
|
||||
\section external External links
|
||||
- You can check the version of the geodesic library with, e.g.,
|
||||
@code{.c}
|
||||
#if GEODESIC_VERSION >= GEODESIC_VERSION_NUM(1,40,0)
|
||||
...
|
||||
#endif
|
||||
@endcode
|
||||
|
||||
\section external-c External links
|
||||
|
||||
- These algorithms are derived in C. F. F. Karney,
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
<a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
Algorithms for geodesics</a>,
|
||||
J. Geodesy <b>87</b>, 43--55 (2013)
|
||||
(<a href="http://geographiclib.sf.net/geod-addenda.html"> addenda</a>).
|
||||
(<a href="https://geographiclib.sourceforge.io/geod-addenda.html"> addenda</a>).
|
||||
- A longer paper on geodesics: C. F. F. Karney,
|
||||
<a href="http://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
<a href="https://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
on an ellipsoid of revolution</a>,
|
||||
Feb. 2011
|
||||
(<a href="http://geographiclib.sf.net/geod-addenda.html#geod-errata">
|
||||
(<a href="https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata">
|
||||
errata</a>).
|
||||
- <a href="http://geographiclib.sf.net">The GeographicLib web site</a>.
|
||||
- <a href="../index.html">The C++ library</a>.
|
||||
- <a href="../java/index.html">The Java library</a>.
|
||||
- <a href="../Fortran/index.html">The Fortran library</a>.
|
||||
- Documentation on the C++ classes: GeographicLib::Geodesic,
|
||||
GeographicLib::GeodesicLine, GeographicLib::PolygonArea.
|
||||
- The section in the %GeographicLib documentation on geodesics: \ref
|
||||
geodesic.
|
||||
- <a href="http://geographiclib.sf.net/geodesic-papers/biblio.html">
|
||||
An online geodesic bibliography</a>.
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/">
|
||||
Main project page</a>
|
||||
- <a href="https://geographiclib.sourceforge.io/">
|
||||
GeographicLib web site</a>
|
||||
- Documentation on the C++ classes: GeographicLib::Geodesic,
|
||||
GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
|
||||
- The section in the %GeographicLib documentation on geodesics: \ref
|
||||
geodesic.
|
||||
- <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
|
||||
git repository</a>
|
||||
- Implementations in various languages
|
||||
- C++ (complete library):
|
||||
<a href="../index.html">
|
||||
documentation</a>,
|
||||
<a href="https://sourceforge.net/projects/geographiclib/files/distrib">
|
||||
download</a>;
|
||||
- C (geodesic routines):
|
||||
<a href="../C/index.html">
|
||||
documentation</a>, also included with recent versions of
|
||||
<a href="http://proj.org">
|
||||
proj.4</a>;
|
||||
- Fortran (geodesic routines):
|
||||
<a href="../Fortran/index.html">
|
||||
documentation</a>;
|
||||
- Java (geodesic routines):
|
||||
<a href="http://repo1.maven.org/maven2/net/sf/geographiclib/GeographicLib-Java/">
|
||||
Maven Central package</a>,
|
||||
<a href="../java/index.html">
|
||||
documentation</a>;
|
||||
- JavaScript (geodesic routines):
|
||||
<a href="https://www.npmjs.com/package/geographiclib">
|
||||
npm package</a>,
|
||||
<a href="../js/index.html">
|
||||
documentation</a>;
|
||||
- Python (geodesic routines):
|
||||
<a href="http://pypi.python.org/pypi/geographiclib">
|
||||
PyPI package</a>,
|
||||
<a href="../python/index.html">
|
||||
documentation</a>;
|
||||
- Matlab/Octave (geodesic and some other routines):
|
||||
<a href="http://www.mathworks.com/matlabcentral/fileexchange/50605">
|
||||
Matlab Central package</a>,
|
||||
<a href="http://www.mathworks.com/matlabcentral/fileexchange/50605/content/Contents.m">
|
||||
documentation</a>;
|
||||
- C# (.NET wrapper for complete C++ library):
|
||||
<a href="../NET/index.html">
|
||||
documentation</a>.
|
||||
- <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
|
||||
A geodesic bibliography</a>.
|
||||
- The wikipedia page,
|
||||
<a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">
|
||||
Geodesics on an ellipsoid</a>.
|
||||
|
||||
\section changes-c Change log
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.49/C">Version 1.49</a>
|
||||
(released 2017-10-05)
|
||||
- Fix more warning messages from some compilers; add tests.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.48/C">Version 1.48</a>
|
||||
(released 2017-04-09)
|
||||
- This is the version slated for the version of proj.4 after 4.9.4
|
||||
(tagged v1.48.1-c).
|
||||
- Fix warnings messages from some compilers.
|
||||
- Change default range for longitude and azimuth to
|
||||
(−180°, 180°] (instead of
|
||||
[−180°, 180°)).
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.47/C">Version 1.47</a>
|
||||
(released 2017-02-15)
|
||||
- This is the version incorporated into proj.4 version 4.9.3 (tagged
|
||||
v1.46.1-c).
|
||||
- Fix the order of declarations, incorporating the patches in version
|
||||
1.46.1.
|
||||
- Improve accuracy of area calculation (fixing a flaw introduced in
|
||||
version 1.46).
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.46/C">Version 1.46</a>
|
||||
(released 2016-02-15)
|
||||
- Add s13 and a13 to the geod_geodesicline struct.
|
||||
- Add geod_directline, geod_gendirectline, and geod_inverseline.
|
||||
- More accurate inverse solution when longitude difference is close
|
||||
to 180°.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.45/C">Version 1.45</a>
|
||||
(released 2015-09-30)
|
||||
- The solution of the inverse problem now correctly returns NaNs if
|
||||
one of the latitudes is a NaN.
|
||||
- Include a test suite that can be run with "make test" after
|
||||
configuring with cmake.
|
||||
- Add geod_polygon_clear().
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.44/C">Version 1.44</a>
|
||||
(released 2015-08-14)
|
||||
- This is the version incorporated into proj.4 version 4.9.2.
|
||||
- Improve accuracy of calculations by evaluating trigonometric
|
||||
functions more carefully and replacing the series for the reduced
|
||||
length with one with a smaller truncation error.
|
||||
- The allowed ranges for longitudes and azimuths is now unlimited;
|
||||
it used to be [−540°, 540°).
|
||||
- Enforce the restriction of latitude to [−90°, 90°] by
|
||||
returning NaNs if the latitude is outside this range.
|
||||
- The inverse calculation sets \e s12 to zero for coincident points
|
||||
at pole (instead of returning a tiny quantity).
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.40/C">Version 1.40</a>
|
||||
(released 2014-12-18)
|
||||
- This is the version incorporated into proj.4 version 4.9.1.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.40/C">Version 1.32</a>
|
||||
(released 2013-07-12)
|
||||
- This is the version incorporated into proj.4 version 4.9.0.
|
||||
|
||||
**********************************************************************/
|
||||
|
|
|
|||
|
|
@ -5,42 +5,52 @@
|
|||
*
|
||||
* Written by Charles Karney <charles@karney.com> and licensed under the
|
||||
* MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
/**
|
||||
\mainpage Geodesic routines implemented in Fortran
|
||||
\author Charles F. F. Karney (charles@karney.com)
|
||||
\version 1.31
|
||||
\version 1.49
|
||||
|
||||
\section abstract Abstract
|
||||
The documentation for other versions is available at
|
||||
<tt>https://geographiclib.sourceforge.io/m.nn/Fortran</tt> for versions numbers
|
||||
<tt>m.nn</tt> ≥ 1.28.
|
||||
|
||||
\section abstract-for Abstract
|
||||
|
||||
This is a Fortran implementation of the geodesic algorithms from <a
|
||||
href="http://geographiclib.sf.net">GeographicLib</a>. This is a
|
||||
href="https://geographiclib.sourceforge.io">GeographicLib</a>. This is a
|
||||
self-contained library which makes it easy to do geodesic computations
|
||||
for an ellipsoid of revolution in a Fortran program. It is written in
|
||||
Fortran 77 (avoiding features which are now deprecated) and should
|
||||
compile correctly with just about any Fortran compiler.
|
||||
|
||||
\section download Downloading the source
|
||||
\section download-for Downloading the source
|
||||
|
||||
The Fortran library is part of %GeographicLib which available for download at
|
||||
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.31.tar.gz">
|
||||
GeographicLib-1.31.tar.gz</a>
|
||||
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.31.zip">
|
||||
GeographicLib-1.31.zip</a>
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.49.tar.gz">
|
||||
GeographicLib-1.49.tar.gz</a>
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.49.zip">
|
||||
GeographicLib-1.49.zip</a>
|
||||
.
|
||||
as either a compressed tar file (tar.gz) or a zip file. After unpacking
|
||||
the source, the Fortran library can be found in
|
||||
GeographicLib-1.31/legacy/Fortran. The library consists of the file
|
||||
geodesic.for.
|
||||
the source, the Fortran library can be found in the directory
|
||||
<tt>legacy/Fortran</tt>. The library consists of the file
|
||||
geodesic.for. The Fortran-90 interface is defined in geodesic.inc.
|
||||
|
||||
\section doc Library documentation
|
||||
Licensed under the
|
||||
<a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>; see
|
||||
<a href="https://geographiclib.sourceforge.io/html/LICENSE.txt">LICENSE.txt</a>.
|
||||
|
||||
The interface to the library is documented via doxygen in the source
|
||||
file. To access this, see geodesic.for.
|
||||
\section doc-for Library documentation
|
||||
|
||||
\section samples Sample programs
|
||||
Here is the
|
||||
\link geodesic.for <i>application programming interface</i>\endlink
|
||||
for the library (this is just the documentation for the source file,
|
||||
geodesic.for).
|
||||
|
||||
\section samples-for Sample programs
|
||||
|
||||
Also included are 3 small test programs:
|
||||
- geoddirect.for is a simple command line utility for solving the
|
||||
|
|
@ -61,40 +71,148 @@ mkdir BUILD
|
|||
cd BUILD
|
||||
cmake ..
|
||||
make
|
||||
make test
|
||||
echo 30 0 29.5 179.5 | ./geodinverse \endverbatim
|
||||
|
||||
\section library Using the library
|
||||
Finally, the two programs
|
||||
- ngsforward
|
||||
- ngsinverse
|
||||
.
|
||||
which are also built with cmake, provide drop-in replacements for
|
||||
replacements for the NGS tools FORWARD and INVERSE available from
|
||||
http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/.
|
||||
These cure two problems of the Vincenty algorithms used by NGS:
|
||||
- the accuracy is "only" 0.1 mm;
|
||||
- the inverse program sometimes goes into an infinite loop.
|
||||
.
|
||||
The corresponding source files
|
||||
- ngsforward.for
|
||||
- ngsinverse.for
|
||||
- ngscommon.for
|
||||
.
|
||||
are derived from the NGS source files
|
||||
- forward.for, version 2.0, dated 2002-08-21
|
||||
- inverse.for, version 3.0, dated 2012-11-04
|
||||
.
|
||||
and are therefore in the public domain.
|
||||
|
||||
- Optionall put @verbatim
|
||||
include "geodesic.inc" @endverbatim
|
||||
\section library-for Using the library
|
||||
|
||||
- Optionally put @code{.for}
|
||||
include "geodesic.inc"
|
||||
@endcode
|
||||
in declaration section of your subroutines.
|
||||
- make calls to the geodesic routines from your code. The interface to
|
||||
the library is documented in geodesic.for.
|
||||
- Compile and link as described above.
|
||||
|
||||
\section external External links
|
||||
\section external-for External links
|
||||
|
||||
- These algorithms are derived in C. F. F. Karney,
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
<a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
Algorithms for geodesics</a>,
|
||||
J. Geodesy <b>87</b>, 43--55 (2013)
|
||||
(<a href="http://geographiclib.sf.net/geod-addenda.html"> addenda</a>).
|
||||
(<a href="https://geographiclib.sourceforge.io/geod-addenda.html"> addenda</a>).
|
||||
- A longer paper on geodesics: C. F. F. Karney,
|
||||
<a href="http://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
<a href="https://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
on an ellipsoid of revolution</a>,
|
||||
Feb. 2011
|
||||
(<a href="http://geographiclib.sf.net/geod-addenda.html#geod-errata">
|
||||
(<a href="https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata">
|
||||
errata</a>).
|
||||
- <a href="http://geographiclib.sf.net">The GeographicLib web site</a>.
|
||||
- <a href="../index.html">The C++ library</a>.
|
||||
- <a href="../C/index.html">The C library</a>.
|
||||
- <a href="../java/index.html">The Java library</a>.
|
||||
- Documentation on the C++ classes: GeographicLib::Geodesic,
|
||||
GeographicLib::GeodesicLine, GeographicLib::PolygonArea.
|
||||
- The section in the %GeographicLib documentation on geodesics: \ref
|
||||
geodesic.
|
||||
- <a href="http://geographiclib.sf.net/geodesic-papers/biblio.html">
|
||||
An online geodesic bibliography</a>.
|
||||
**********************************************************************/
|
||||
- <a href="https://sourceforge.net/projects/geographiclib/">
|
||||
Main project page</a>
|
||||
- <a href="https://geographiclib.sourceforge.io/">
|
||||
GeographicLib web site</a>
|
||||
- Documentation on the C++ classes: GeographicLib::Geodesic,
|
||||
GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
|
||||
- The section in the %GeographicLib documentation on geodesics: \ref
|
||||
geodesic.
|
||||
- <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
|
||||
git repository</a>
|
||||
- Implementations in various languages
|
||||
- C++ (complete library):
|
||||
<a href="../index.html">
|
||||
documentation</a>,
|
||||
<a href="https://sourceforge.net/projects/geographiclib/files/distrib">
|
||||
download</a>;
|
||||
- C (geodesic routines):
|
||||
<a href="../C/index.html">
|
||||
documentation</a>, also included with recent versions of
|
||||
<a href="https://github.com/OSGeo/proj.4/wiki">
|
||||
proj.4</a>;
|
||||
- Fortran (geodesic routines):
|
||||
<a href="../Fortran/index.html">
|
||||
documentation</a>;
|
||||
- Java (geodesic routines):
|
||||
<a href="http://repo1.maven.org/maven2/net/sf/geographiclib/GeographicLib-Java/">
|
||||
Maven Central package</a>,
|
||||
<a href="../java/index.html">
|
||||
documentation</a>;
|
||||
- JavaScript (geodesic routines):
|
||||
<a href="https://www.npmjs.com/package/geographiclib">
|
||||
npm package</a>,
|
||||
<a href="../js/index.html">
|
||||
documentation</a>;
|
||||
- Python (geodesic routines):
|
||||
<a href="http://pypi.python.org/pypi/geographiclib">
|
||||
PyPI package</a>,
|
||||
<a href="../python/index.html">
|
||||
documentation</a>;
|
||||
- Matlab/Octave (geodesic and some other routines):
|
||||
<a href="http://www.mathworks.com/matlabcentral/fileexchange/50605">
|
||||
Matlab Central package</a>,
|
||||
<a href="http://www.mathworks.com/matlabcentral/fileexchange/50605/content/Contents.m">
|
||||
documentation</a>;
|
||||
- C# (.NET wrapper for complete C++ library):
|
||||
<a href="../NET/index.html">
|
||||
documentation</a>.
|
||||
- <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
|
||||
A geodesic bibliography</a>.
|
||||
- The wikipedia page,
|
||||
<a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">
|
||||
Geodesics on an ellipsoid</a>.
|
||||
|
||||
\section changes-for Change log
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.49/Fortran">Version 1.49</a>
|
||||
(released 2017-10-05)
|
||||
- Fix code formatting and add two tests.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.48/Fortran">Version 1.48</a>
|
||||
(released 2017-04-09)
|
||||
- Change default range for longitude and azimuth to
|
||||
(−180°, 180°] (instead of
|
||||
[−180°, 180°)).
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.47/Fortran">Version 1.47</a>
|
||||
(released 2017-02-15)
|
||||
- Improve accuracy of area calculation (fixing a flaw introduced in
|
||||
version 1.46).
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.46/Fortran">Version 1.46</a>
|
||||
(released 2016-02-15)
|
||||
- More accurate inverse solution when longitude difference is close
|
||||
to 180°.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.45/Fortran">Version 1.45</a>
|
||||
(released 2015-09-30)
|
||||
- The solution of the inverse problem now correctly returns NaNs if
|
||||
one of the latitudes is a NaN.
|
||||
- Include a test suite that can be run with "make test" after
|
||||
configuring with cmake.
|
||||
- The library now treats latitudes outside the range [−90°,
|
||||
90°] as NaNs; so the sample programs no longer check for legal
|
||||
values of latitude.
|
||||
|
||||
- <a href="https://geographiclib.sourceforge.io/1.44/Fortran">Version 1.44</a>
|
||||
(released 2015-08-14)
|
||||
- Improve accuracy of calculations by evaluating trigonometric
|
||||
functions more carefully and replacing the series for the reduced
|
||||
length with one with a smaller truncation error.
|
||||
- The allowed ranges for longitudes and azimuths is now unlimited;
|
||||
it used to be [−540°, 540°).
|
||||
- The sample programs, geoddirect and geodinverse, enforce the
|
||||
restriction of latitude to [−90°, 90°].
|
||||
- The inverse calculation sets \e s12 to zero for coincident points
|
||||
at pole (instead of returning a tiny quantity).
|
||||
**********************************************************************/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<title>
|
||||
Series for geodesic calculations
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<body>
|
||||
<h2>
|
||||
Series for geodesic calculations
|
||||
|
|
@ -12,15 +13,15 @@ This extends the series given
|
|||
flattening. See
|
||||
<blockquote>
|
||||
Charles F. F. Karney,<br>
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
<i>Algorithms for geodesics</i></a>,<br>
|
||||
<a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
<i>Algorithms for geodesics</i></a>,<br>
|
||||
J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
|
||||
DOI:
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
10.1007/s00190-012-0578-z</a>
|
||||
(<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
|
||||
addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
geod-addenda.html</a>.
|
||||
<a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
10.1007/s00190-012-0578-z</a>
|
||||
(<a href="https://doi.org/10.1007/s00190-012-0578-z">pdf</a>);
|
||||
addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
|
||||
geod-addenda.html</a>.
|
||||
</blockquote>
|
||||
|
||||
<pre>
|
||||
|
|
@ -524,21 +525,21 @@ C1'[28] = + 137344334847260471742767128830849077140799/3817741892241658452955877
|
|||
C1'[29] = + 2381352350093111938327626556685002210278872879/37975078602127776631552109325582336000000 * eps^29;
|
||||
C1'[30] = + 20034557328168749612075941075238883149/182929433787470496587153418485760 * eps^30;
|
||||
|
||||
A2 = (1 + 1/4 * eps^2
|
||||
+ 9/64 * eps^4
|
||||
+ 25/256 * eps^6
|
||||
+ 1225/16384 * eps^8
|
||||
+ 3969/65536 * eps^10
|
||||
+ 53361/1048576 * eps^12
|
||||
+ 184041/4194304 * eps^14
|
||||
+ 41409225/1073741824 * eps^16
|
||||
+ 147744025/4294967296 * eps^18
|
||||
+ 2133423721/68719476736 * eps^20
|
||||
+ 7775536041/274877906944 * eps^22
|
||||
+ 457028729521/17592186044416 * eps^24
|
||||
+ 1690195005625/70368744177664 * eps^26
|
||||
+ 25145962430625/1125899906842624 * eps^28
|
||||
+ 93990019574025/4503599627370496 * eps^30) * (1 - eps);
|
||||
A2 = (1 - 3/4 * eps^2
|
||||
- 7/64 * eps^4
|
||||
- 11/256 * eps^6
|
||||
- 375/16384 * eps^8
|
||||
- 931/65536 * eps^10
|
||||
- 10143/1048576 * eps^12
|
||||
- 29403/4194304 * eps^14
|
||||
- 5705271/1073741824 * eps^16
|
||||
- 17892875/4294967296 * eps^18
|
||||
- 230480679/68719476736 * eps^20
|
||||
- 758158843/274877906944 * eps^22
|
||||
- 40605577103/17592186044416 * eps^24
|
||||
- 137919912459/70368744177664 * eps^26
|
||||
- 1897157659375/1125899906842624 * eps^28
|
||||
- 6593830148475/4503599627370496 * eps^30) / (1 + eps);
|
||||
|
||||
C2[1] = + 1/2 * eps
|
||||
+ 1/16 * eps^3
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<title>GeographicLib-@PROJECT_VERSION@ documentation</title>
|
||||
<meta HTTP-EQUIV="Refresh"
|
||||
CONTENT="0; URL=http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html">
|
||||
CONTENT="0; URL=https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html">
|
||||
</head>
|
||||
<body topmargin=10 leftmargin=10>
|
||||
<h3>
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
Online documentation for GeographicLib version
|
||||
@PROJECT_VERSION@ is available at
|
||||
<center>
|
||||
<a href="http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html">
|
||||
http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html</a>.
|
||||
<a href="https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html">
|
||||
https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html</a>.
|
||||
</center>
|
||||
<br>
|
||||
You will be redirected there. Click on the link to go there
|
||||
|
|
|
|||
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
|
||||
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'Dialog'; font-style:normal; stroke-linejoin:miter; font-size:12px; stroke-dashoffset:0; image-rendering:auto;" width="566" height="396" xmlns="http://www.w3.org/2000/svg"
|
||||
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
|
||||
/><g
|
||||
><defs id="defs1"
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
|
||||
><path d="M0 0 L566 0 L566 396 L0 396 L0 0 Z"
|
||||
/></clipPath
|
||||
><font horiz-adv-x="60.009766" id="font1"
|
||||
><font-face ascent="92.822266" descent="23.583984" units-per-em="100" style="font-style:normal; font-family:SansSerif; font-weight:normal;"
|
||||
/><missing-glyph horiz-adv-x="60.009766" d="M4.9844 -17.6719 L4.9844 70.5156 L54.9844 70.5156 L54.9844 -17.6719 L4.9844 -17.6719 ZM10.5938 -12.1094 L49.4219 -12.1094 L49.4219 64.8906 L10.5938 64.8906 L10.5938 -12.1094 Z"
|
||||
/><glyph unicode="0" horiz-adv-x="63.623047" d="M31.7812 66.4062 Q24.1719 66.4062 20.3359 58.9141 Q16.5 51.4219 16.5 36.375 Q16.5 21.3906 20.3359 13.8906 Q24.1719 6.3906 31.7812 6.3906 Q39.4531 6.3906 43.2891 13.8906 Q47.125 21.3906 47.125 36.375 Q47.125 51.4219 43.2891 58.9141 Q39.4531 66.4062 31.7812 66.4062 ZM31.7812 74.2188 Q44.0469 74.2188 50.5156 64.5234 Q56.9844 54.8281 56.9844 36.375 Q56.9844 17.9688 50.5156 8.2734 Q44.0469 -1.4219 31.7812 -1.4219 Q19.5312 -1.4219 13.0625 8.2734 Q6.5938 17.9688 6.5938 36.375 Q6.5938 54.8281 13.0625 64.5234 Q19.5312 74.2188 31.7812 74.2188 Z"
|
||||
/><glyph unicode="1" horiz-adv-x="63.623047" d="M12.4062 8.2969 L28.5156 8.2969 L28.5156 63.9219 L10.9844 60.4062 L10.9844 69.3906 L28.4219 72.9062 L38.2812 72.9062 L38.2812 8.2969 L54.3906 8.2969 L54.3906 0 L12.4062 0 L12.4062 8.2969 Z"
|
||||
/><glyph unicode="2" horiz-adv-x="63.623047" d="M19.1875 8.2969 L53.6094 8.2969 L53.6094 0 L7.3281 0 L7.3281 8.2969 Q12.9375 14.1094 22.6328 23.8984 Q32.3281 33.6875 34.8125 36.5312 Q39.5469 41.8438 41.4297 45.5312 Q43.3125 49.2188 43.3125 52.7812 Q43.3125 58.5938 39.2344 62.2578 Q35.1562 65.9219 28.6094 65.9219 Q23.9688 65.9219 18.8203 64.3125 Q13.6719 62.7031 7.8125 59.4219 L7.8125 69.3906 Q13.7656 71.7812 18.9453 73 Q24.125 74.2188 28.4219 74.2188 Q39.75 74.2188 46.4844 68.5547 Q53.2188 62.8906 53.2188 53.4219 Q53.2188 48.9219 51.5391 44.8984 Q49.8594 40.875 45.4062 35.4062 Q44.1875 33.9844 37.6484 27.2188 Q31.1094 20.4531 19.1875 8.2969 Z"
|
||||
/><glyph unicode="3" horiz-adv-x="63.623047" d="M40.5781 39.3125 Q47.6562 37.7969 51.6328 33.0078 Q55.6094 28.2188 55.6094 21.1875 Q55.6094 10.4062 48.1875 4.4922 Q40.7656 -1.4219 27.0938 -1.4219 Q22.5156 -1.4219 17.6562 -0.5156 Q12.7969 0.3906 7.625 2.2031 L7.625 11.7188 Q11.7188 9.3281 16.6016 8.1094 Q21.4844 6.8906 26.8125 6.8906 Q36.0781 6.8906 40.9375 10.5469 Q45.7969 14.2031 45.7969 21.1875 Q45.7969 27.6406 41.2812 31.2734 Q36.7656 34.9062 28.7188 34.9062 L20.2188 34.9062 L20.2188 43.0156 L29.1094 43.0156 Q36.375 43.0156 40.2344 45.9219 Q44.0938 48.8281 44.0938 54.2969 Q44.0938 59.9062 40.1172 62.9141 Q36.1406 65.9219 28.7188 65.9219 Q24.6562 65.9219 20.0156 65.0391 Q15.375 64.1562 9.8125 62.3125 L9.8125 71.0938 Q15.4375 72.6562 20.3438 73.4375 Q25.25 74.2188 29.5938 74.2188 Q40.8281 74.2188 47.3672 69.1172 Q53.9062 64.0156 53.9062 55.3281 Q53.9062 49.2656 50.4375 45.0938 Q46.9688 40.9219 40.5781 39.3125 Z"
|
||||
/><glyph unicode="R" horiz-adv-x="69.48242" d="M44.3906 34.1875 Q47.5625 33.1094 50.5625 29.5938 Q53.5625 26.0781 56.5938 19.9219 L66.6094 0 L56 0 L46.6875 18.7031 Q43.0625 26.0312 39.6719 28.4219 Q36.2812 30.8125 30.4219 30.8125 L19.6719 30.8125 L19.6719 0 L9.8125 0 L9.8125 72.9062 L32.0781 72.9062 Q44.5781 72.9062 50.7344 67.6797 Q56.8906 62.4531 56.8906 51.9062 Q56.8906 45.0156 53.6875 40.4766 Q50.4844 35.9375 44.3906 34.1875 ZM19.6719 64.7969 L19.6719 38.9219 L32.0781 38.9219 Q39.2031 38.9219 42.8438 42.2188 Q46.4844 45.5156 46.4844 51.9062 Q46.4844 58.2969 42.8438 61.5469 Q39.2031 64.7969 32.0781 64.7969 L19.6719 64.7969 Z"
|
||||
/><glyph unicode="Z" horiz-adv-x="68.50586" d="M5.6094 72.9062 L62.8906 72.9062 L62.8906 65.375 L16.7969 8.2969 L64.0156 8.2969 L64.0156 0 L4.5 0 L4.5 7.5156 L50.5938 64.5938 L5.6094 64.5938 L5.6094 72.9062 Z"
|
||||
/></font
|
||||
></defs
|
||||
><g style="fill:white; stroke:white;"
|
||||
><rect x="0" y="0" width="566" style="clip-path:url(#clipPath1); stroke:none;" height="396"
|
||||
/></g
|
||||
><g style="fill:white; text-rendering:optimizeSpeed; color-rendering:optimizeSpeed; image-rendering:optimizeSpeed; shape-rendering:crispEdges; color-interpolation:sRGB; stroke:white;"
|
||||
><rect x="0" width="566" height="396" y="0" style="stroke:none;"
|
||||
/><path style="stroke:none;" d="M40 353.6667 L549 353.6667 L549 14.3333 L40 14.3333 Z"
|
||||
/></g
|
||||
><g style="fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(38,38,38); stroke-width:0.6667;"
|
||||
><line y2="353.6667" style="fill:none;" x1="40" x2="549" y1="353.6667"
|
||||
/><line y2="14.3333" style="fill:none;" x1="40" x2="549" y1="14.3333"
|
||||
/><line y2="348.5767" style="fill:none;" x1="40" x2="40" y1="353.6667"
|
||||
/><line y2="348.5767" style="fill:none;" x1="209.6667" x2="209.6667" y1="353.6667"
|
||||
/><line y2="348.5767" style="fill:none;" x1="379.3333" x2="379.3333" y1="353.6667"
|
||||
/><line y2="348.5767" style="fill:none;" x1="549" x2="549" y1="353.6667"
|
||||
/><line y2="19.4233" style="fill:none;" x1="40" x2="40" y1="14.3333"
|
||||
/><line y2="19.4233" style="fill:none;" x1="209.6667" x2="209.6667" y1="14.3333"
|
||||
/><line y2="19.4233" style="fill:none;" x1="379.3333" x2="379.3333" y1="14.3333"
|
||||
/><line y2="19.4233" style="fill:none;" x1="549" x2="549" y1="14.3333"
|
||||
/></g
|
||||
><g transform="translate(40,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
|
||||
>0</text
|
||||
></g
|
||||
><g transform="translate(209.6667,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
|
||||
>1</text
|
||||
></g
|
||||
><g transform="translate(379.3333,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
|
||||
>2</text
|
||||
></g
|
||||
><g transform="translate(549,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
|
||||
>3</text
|
||||
></g
|
||||
><g transform="translate(294.5002,377.3333)" style="font-size:15px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-5.5" xml:space="preserve" y="14" style="stroke:none;"
|
||||
>R</text
|
||||
></g
|
||||
><g style="fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(38,38,38); stroke-width:0.6667;"
|
||||
><line y2="14.3333" style="fill:none;" x1="40" x2="40" y1="353.6667"
|
||||
/><line y2="14.3333" style="fill:none;" x1="549" x2="549" y1="353.6667"
|
||||
/><line y2="353.6667" style="fill:none;" x1="40" x2="45.09" y1="353.6667"
|
||||
/><line y2="184" style="fill:none;" x1="40" x2="45.09" y1="184"
|
||||
/><line y2="14.3333" style="fill:none;" x1="40" x2="45.09" y1="14.3333"
|
||||
/><line y2="353.6667" style="fill:none;" x1="549" x2="543.91" y1="353.6667"
|
||||
/><line y2="184" style="fill:none;" x1="549" x2="543.91" y1="184"
|
||||
/><line y2="14.3333" style="fill:none;" x1="549" x2="543.91" y1="14.3333"
|
||||
/></g
|
||||
><g transform="translate(34.6667,353.6667)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
|
||||
>0</text
|
||||
></g
|
||||
><g transform="translate(34.6667,184)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
|
||||
>1</text
|
||||
></g
|
||||
><g transform="translate(34.6667,14.3333)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
|
||||
>2</text
|
||||
></g
|
||||
><g transform="translate(11.9506,150.0665)" style="font-size:15px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
|
||||
><text x="-5.5" xml:space="preserve" y="-4" style="stroke:none;"
|
||||
>Z</text
|
||||
></g
|
||||
><g style="stroke-linecap:butt; fill:rgb(23,115,69); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(23,115,69); stroke-width:0.6667;"
|
||||
><line y2="353.6667" style="fill:none;" x1="209.6667" x2="549" y1="353.6667"
|
||||
/><path d="M207.0891 330.0967 L236.9066 323.4906 L256.7424 318.9066 L274.8645 314.4418 L289.6187 310.5099 L304.2762 306.2299 L317.1844 302.0323 L328.34 297.9586 L339.3022 293.3956 L348.4761 288.9841 L352.9553 286.5662 L357.3412 283.9844 L361.6133 281.2195 L365.7498 278.2526 L369.7166 275.0645 L372.2498 272.8081 L375.8568 269.2187 L378.1151 266.6862 L380.2427 264.0426 L382.2278 261.2908 L384.0602 258.436 L385.7365 255.4853 L387.2483 252.4479 L389.2079 247.7517 L390.3108 244.543 L391.6732 239.64 L392.7082 234.657 L393.4428 229.6212 L393.9094 224.5531 L394.1367 219.4685 L394.1503 214.3788 L393.9789 209.292 L393.6413 204.2134 L392.9643 197.461 L392.06 190.7351 L390.9589 184.0385 L389.6864 177.3728 L387.8794 169.0846 L384.1129 154.2863 L379.2791 138.0254 L373.8718 121.9427 L367.36 104.4535 L360.329 87.1661 L352.8365 70.0739 L344.192 51.6396 L335.1046 33.4208 L325.0091 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M199.4346 307.2432 L222.5868 296.6773 L237.9484 289.4711 L251.6626 282.7587 L263.7259 276.5357 L275.6195 269.9976 L285.8436 263.9542 L295.8404 257.5442 L304.1778 251.7045 L312.2437 245.494 L319.9653 238.862 L323.6691 235.3724 L327.2542 231.7591 L332.9244 225.4513 L338.1552 218.7749 L342.8771 211.7296 L347.0271 204.3329 L349.2192 199.7398 L350.5511 196.6193 L353.4236 188.6394 L355.636 180.4523 L357.2071 172.1182 L357.8586 167.069 L358.3015 161.9993 L358.5492 156.9161 L358.6119 151.8261 L358.2319 141.6546 L357.2495 131.5238 L355.451 119.7863 L353.052 108.1556 L350.1439 96.6403 L346.2891 83.6269 L341.949 70.7679 L336.5706 56.4768 L330.7442 42.3623 L324.5293 28.4157 L317.7957 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M186.9356 285.8 L215.7339 264.8197 L226.5468 256.6158 L235.8768 249.2667 L245.0422 241.7155 L254.004 233.9212 L261.4812 227.0144 L268.7327 219.8709 L275.7162 212.464 L281.2932 206.0726 L287.6489 198.1217 L292.6235 191.2507 L297.2656 184.1512 L301.5378 176.8231 L305.4045 169.2729 L308.8334 161.5158 L311.7975 153.5686 L314.278 145.4568 L316.2665 137.211 L317.7647 128.8617 L318.781 120.4412 L319.3358 111.9765 L319.4495 103.4949 L319.1543 95.0183 L318.4756 86.5621 L317.2014 76.4636 L315.4691 66.4329 L313.3279 56.4802 L310.8202 46.6158 L307.4829 35.2176 L303.7519 23.9433 L300.2244 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M169.9721 266.419 L190.9684 244.2415 L205.8005 227.9174 L212.4746 220.2301 L219.0034 212.4203 L225.3625 204.4703 L230.5068 197.7262 L235.495 190.8639 L240.3034 183.8761 L244.9132 176.7552 L249.3025 169.4952 L253.4474 162.0943 L257.326 154.5493 L260.9145 146.8634 L263.5613 140.6145 L266.5746 132.6843 L269.24 124.6319 L271.5458 116.4693 L273.1237 109.8676 L274.4573 103.2149 L275.7841 94.8368 L276.573 88.0959 L277.2211 79.638 L277.4739 72.8565 L277.4723 64.3731 L277.1278 55.8983 L276.4576 47.4421 L275.4804 39.0147 L274.213 30.6264 L272.6775 22.2839 L270.954 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M149.0597 249.6888 L164.1276 227.1081 L175.1756 210.0067 L184.9403 194.1023 L193.3939 179.3918 L201.3296 164.3967 L207.9327 150.63 L211.3464 142.8643 L213.9338 136.59 L218.6929 123.8803 L221.3652 115.8279 L223.3231 109.3314 L225.1165 102.7857 L226.7402 96.1958 L228.1875 89.5652 L229.4532 82.899 L230.5374 76.1989 L231.4366 69.4716 L232.1509 62.724 L232.6769 55.9577 L233.0179 49.1795 L233.1757 42.3945 L233.1536 35.6078 L232.9534 28.8246 L232.5785 22.0481 L231.9324 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M124.8333 236.1182 L135.4541 212.9903 L143.0664 195.9501 L149.7492 180.3556 L155.4996 166.2088 L160.9376 151.9415 L165.4605 139.1435 L169.6476 126.2336 L173.4579 113.2066 L176.8524 100.0642 L179.795 86.8149 L182.2534 73.4673 L183.9868 61.7178 L185.4719 48.2276 L186.3277 36.3815 L186.7657 24.5133 L186.7843 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M98.0294 226.1191 L108.7986 188.6114 L116.7251 159.1184 L120.01 145.9489 L123.1093 132.7335 L125.9966 119.4724 L128.3286 107.8265 L130.7501 94.4703 L132.6383 82.7463 L134.2965 70.985 L135.712 59.1932 L136.8737 47.3742 L137.773 35.5315 L138.4024 23.6718 L138.6988 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M69.4623 219.9955 L74.6093 183.0261 L78.3616 154.4271 L81.5763 127.4721 L84.0514 103.8478 L86.1431 80.1877 L87.6919 58.1854 L88.8218 36.1576 L89.4974 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><line y2="14.3333" style="fill:none;" x1="40" x2="40" y1="217.9333"
|
||||
/><path d="M422.3676 353.6667 L422.2759 343.3175 L422.0079 333.1412 L421.5634 322.9711 L420.9441 312.8101 L420.1483 302.6613 L419.1795 292.5275 L418.0394 282.4117 L416.492 270.6366 L413.3057 250.5283 L411.4648 240.5165 L409.1098 228.8755 L406.9194 218.9342 L404.164 207.3816 L401.636 197.5207 L398.4955 186.0669 L395.6434 176.2937 L392.1347 164.9481 L385.1122 144.0401 L377.4653 123.3526 L373.0998 112.3074 L368.568 101.3299 L359.0327 79.5752 L348.9019 58.0904 L337.4409 35.3686 L326.1346 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M549 277.3167 L537.1997 275.9758 L527.1079 274.6404 L517.0467 273.0931 L507.0279 271.284 L498.7295 269.5305 L490.4921 267.5038 L482.3431 265.1454 L475.9144 262.9734 L469.5926 260.5039 L463.4167 257.694 L457.4292 254.5024 L451.6809 250.8972 L446.2261 246.8618 L442.356 243.5564 L438.6912 240.0251 L434.134 234.9991 L428.9489 228.2874 L424.278 221.2084 L419.2254 212.3718 L414.6325 203.288 L410.3586 194.0487 L405.6351 183.1517 L388.2256 140.7791 L380.3361 122.0106 L373.5545 106.4589 L366.554 91.004 L357.1019 71.075 L348.0213 52.8528 L337.804 33.3055 L327.3906 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M549 200.9667 L538.9965 199.0849 L530.693 197.3465 L520.781 195.0276 L512.5743 192.8759 L504.4319 190.4994 L496.366 187.8723 L488.3951 184.9676 L482.1021 182.4272 L474.3619 178.9575 L468.2862 175.9341 L462.3309 172.6815 L456.5079 169.1949 L450.8326 165.4741 L445.315 161.5226 L439.9654 157.3488 L434.7872 152.9629 L429.7786 148.3819 L424.9414 143.6244 L420.2654 138.7058 L415.7404 133.648 L411.3579 128.4664 L406.0592 121.8409 L400.9336 115.0814 L395.959 108.2099 L386.3592 94.2209 L376.1758 78.581 L366.2198 62.7952 L336.0411 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M549 141.5833 L532.4439 137.8761 L517.6761 133.9975 L503.078 129.5217 L490.2903 124.973 L477.7332 119.8253 L471.5573 117.0122 L465.4595 114.0346 L459.4449 110.8872 L453.5235 107.572 L447.7005 104.087 L441.9794 100.4375 L432.2269 93.661 L426.8061 89.5788 L421.4955 85.3541 L411.1984 76.5111 L406.2068 71.9131 L400.1039 66.0223 L389.4675 55.0669 L378.1033 42.4692 L367.1173 29.5406 L354.7701 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M549 82.2 L537.4152 79.582 L525.8931 76.7079 L514.4423 73.5521 L504.7 70.605 L493.4291 66.8604 L483.865 63.3721 L474.4043 59.614 L465.0608 55.5759 L455.8462 51.2494 L446.7724 46.6328 L439.3292 42.5642 L430.5455 37.4199 L421.9298 32.0007 L413.4839 26.3152 L405.2126 20.3837 L397.2033 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M549 31.3 L532.4507 27.5588 L516.0151 23.3511 L499.7203 18.6276 L486.4319 14.2929" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M209.6667 353.6667 L209.4548 346.8844 L208.8205 340.1285 L207.7693 333.4247 L206.3093 326.7982 L204.4514 320.2719 L202.2091 313.8673 L199.598 307.604 L196.6351 301.4994 L193.3385 295.5682 L189.7266 289.8233 L185.8188 284.2755 L180.5466 277.6312 L176.0414 272.5563 L171.3004 267.7011 L166.3409 263.0694 L159.8591 257.5982 L154.467 253.4778 L147.4927 248.6498 L141.7427 245.0456 L134.3632 240.8628 L128.3207 237.7737 L120.6127 234.2324 L112.7517 231.0448 L104.7572 228.2087 L98.2776 226.1915 L90.0876 223.9826 L81.812 222.1195 L73.4664 220.6 L65.0659 219.4227 L56.6244 218.5864 L48.1562 218.0903 L39.9596 217.9388" style="fill:none; stroke-width:1.3333; fill-rule:evenodd; stroke:rgb(179,27,27);"
|
||||
/><path d="M213.0227 353.6667 L212.8174 346.8842 L212.2032 340.1263 L211.1852 333.4176 L209.7685 326.7815 L207.9649 320.2398 L205.7862 313.8133 L203.2465 307.5207 L199.5878 299.8688 L196.2941 293.9359 L192.6929 288.1843 L188.8022 282.6245 L183.5589 275.9571 L179.0817 270.8576 L173.1598 264.7849 L168.1818 260.1729 L161.6848 254.7196 L156.2856 250.6086 L149.3074 245.7862 L142.0986 241.3154 L134.6833 237.1963 L128.6176 234.1533 L120.886 230.6638 L113.0069 227.5214 L104.9985 224.7244 L98.5106 222.7341 L90.313 220.5533 L82.0325 218.7123 L73.6839 217.2094 L65.2817 216.0427 L56.8398 215.2117 L48.3716 214.7151 L39.9596 214.5539" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M216.567 353.6667 L216.3668 346.8839 L215.7713 340.1243 L214.7838 333.4108 L213.4095 326.7658 L211.6586 320.2099 L209.5421 313.7628 L207.0716 307.4427 L203.5084 299.7456 L200.2966 293.7679 L195.8565 286.5411 L191.9843 280.9682 L186.7715 274.2771 L182.3234 269.1523 L176.442 263.0401 L171.4991 258.3904 L165.0481 252.8828 L159.6864 248.7229 L152.7555 243.8324 L145.5938 239.2871 L138.2243 235.0865 L130.669 231.2299 L122.9483 227.7161 L115.0812 224.5435 L107.0857 221.7103 L98.9785 219.2143 L90.7756 217.0538 L82.4918 215.227 L74.1419 213.7321 L65.7393 212.568 L57.2977 211.7334 L48.83 211.2276 L39.9596 211.0762" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M220.3149 353.6667 L220.1215 346.8836 L219.5447 340.1225 L218.586 333.4047 L216.8605 325.1004 L215.0705 318.5552 L212.926 312.1172 L210.437 305.8037 L206.867 298.11 L203.6591 292.1302 L199.2344 284.8938 L195.3817 279.3074 L190.2006 272.5916 L185.7827 267.4407 L179.9436 261.2881 L173.7796 255.4609 L167.3189 249.9645 L161.9544 245.8084 L155.0247 240.9162 L147.8685 236.3618 L140.5082 232.1455 L132.9644 228.2664 L125.257 224.7236 L117.4043 221.5155 L109.4235 218.6407 L101.3311 216.097 L93.1425 213.8829 L84.8721 211.9965 L74.8594 210.1633 L66.4578 208.9929 L58.0174 208.1461 L49.5507 207.622 L39.9596 207.4305" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M224.2868 353.6667 L224.0985 346.8835 L223.5386 340.1208 L222.6088 333.399 L220.9342 325.0843 L219.1951 318.5253 L216.5348 310.4712 L214.0322 304.1635 L210.4556 296.4724 L207.2535 290.4897 L202.8456 283.243 L198.015 276.2707 L192.7906 269.5883 L188.3465 264.4598 L182.4845 258.3291 L176.3068 252.5163 L169.84 247.0273 L163.1088 241.8653 L156.1372 237.0332 L148.9475 232.5316 L141.5611 228.3611 L133.9975 224.5206 L126.2755 221.0097 L118.4126 217.8266 L110.4254 214.9699 L102.3294 212.4378 L94.1393 210.2288 L85.8692 208.3412 L75.8584 206.4981 L67.4587 205.3127 L57.3292 204.3089 L48.8604 203.8208 L39.9596 203.6733" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M228.5048 353.6667 L228.3232 346.8832 L227.5869 338.4334 L226.596 331.7205 L224.8603 323.4182 L223.0839 316.8688 L220.393 308.825 L217.8785 302.5225 L214.2986 294.8327 L211.1021 288.8467 L206.7124 281.5887 L201.9095 274.5974 L196.7204 267.8876 L192.3092 262.7306 L186.4929 256.5564 L180.3644 250.6919 L173.9491 245.1424 L167.271 239.9121 L160.3529 235.0035 L153.2165 230.4183 L145.882 226.1566 L138.369 222.2183 L130.6955 218.6027 L122.8784 215.3086 L113.3315 211.7778 L105.2543 209.1858 L95.4379 206.493 L87.1699 204.5957 L77.1628 202.7322 L68.7666 201.5228 L58.6409 200.4818 L50.1743 199.9556 L39.9975 199.7328" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M232.9992 353.6667 L232.8228 346.8831 L232.1085 338.4313 L231.1431 331.7142 L229.4566 323.4019 L227.7294 316.8395 L225.1114 308.7717 L222.0014 300.8803 L218.4198 293.1915 L215.2317 287.2014 L210.8594 279.9321 L206.0857 272.9211 L200.9329 266.1833 L195.4274 259.7306 L189.5939 253.5723 L183.4572 247.7163 L177.0411 242.1678 L170.3681 236.9309 L163.4602 232.008 L156.3377 227.4009 L147.5352 222.2897 L140.0083 218.378 L132.3256 214.7816 L124.5035 211.4994 L114.9545 207.9739 L106.8785 205.3783 L97.0657 202.6725 L88.8021 200.7565 L78.8007 198.8621 L70.4094 197.6193 L60.2886 196.5299 L50.1303 195.8773 L39.9596 195.6615" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M237.7991 353.6667 L237.6277 346.8829 L236.9321 338.4294 L235.7088 330.0362 L233.9646 321.7356 L232.2035 315.182 L229.5567 307.1234 L226.4331 299.2378 L222.8515 291.5492 L218.8321 284.0793 L214.4004 276.8469 L209.5793 269.8681 L204.3921 263.1566 L198.8633 256.7235 L193.0164 250.5782 L186.8748 244.7273 L179.1474 238.1023 L172.4348 232.9161 L165.4962 228.0365 L158.3506 223.465 L149.5292 218.3867 L141.9922 214.494 L132.7498 210.2291 L124.9005 207.0124 L115.3266 203.5553 L107.235 201.0084 L97.4088 198.3514 L87.4754 196.1276 L77.4553 194.3347 L69.053 193.1686 L58.9236 192.1616 L48.7609 191.5816 L39.9596 191.4486" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M242.9434 353.6667 L242.7771 346.8827 L242.1018 338.4277 L240.9108 330.0295 L239.2141 321.7191 L237.0203 313.5254 L234.3481 305.4754 L231.2109 297.5947 L227.6276 289.9061 L223.6217 282.4301 L219.2121 275.1843 L214.4207 268.1844 L208.2012 260.127 L202.6526 253.711 L196.7957 247.5751 L190.6523 241.7262 L182.9314 235.0932 L176.231 229.8914 L167.8995 224.0437 L160.7357 219.5009 L151.9003 214.4467 L144.3574 210.5656 L135.1133 206.3042 L127.2662 203.0821 L117.698 199.6087 L109.6132 197.0402 L99.7966 194.3475 L89.8739 192.0775 L79.864 190.2281 L69.7857 188.798 L59.6569 187.7854 L49.495 187.1894 L39.9596 187.0207" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M248.4796 353.6667 L248.2268 345.1884 L247.4684 336.7403 L246.2095 328.3522 L244.4568 320.0528 L242.2257 311.8696 L239.5263 303.8281 L236.3773 295.9523 L232.7956 288.2635 L228.8 280.7812 L224.4107 273.5224 L219.6516 266.5018 L213.4774 258.4087 L207.9753 251.9532 L200.9735 244.5654 L194.8307 238.7156 L187.12 232.0708 L180.434 226.8503 L172.1261 220.9692 L163.5357 215.5088 L154.6913 210.4699 L147.1464 206.5926 L137.9048 202.3257 L128.4808 198.478 L118.897 195.0477 L109.1745 192.0327 L99.3333 189.4312 L89.3925 187.2408 L79.3701 185.4602 L69.2838 184.0874 L59.1504 183.1211 L48.9866 182.5612 L39.9596 182.4228" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M254.4655 353.6667 L254.2177 345.1881 L253.478 336.7383 L252.2496 328.3454 L250.5428 320.037 L248.3642 311.8393 L245.7293 303.7764 L242.655 295.8714 L238.4048 286.6227 L234.4193 279.1348 L229.1342 270.4365 L224.3326 263.4435 L218.1263 255.3759 L212.6087 248.934 L205.5994 241.5526 L199.4599 235.6993 L191.7619 229.0396 L185.093 223.7973 L176.8114 217.879 L168.2527 212.3691 L159.4436 207.2686 L150.4097 202.5778 L141.1749 198.2958 L131.762 194.4213 L122.192 190.9526 L112.485 187.8879 L102.6601 185.2255 L92.7353 182.9633 L81.0534 180.8272 L70.971 179.4258 L60.8413 178.4214 L50.6802 177.8106 L39.9596 177.6175" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M260.9705 353.6667 L260.7295 345.1879 L260.0068 336.7365 L258.8072 328.3395 L257.8622 323.3384 L256.7492 318.3718 L254.5316 310.1847 L251.2842 300.5383 L248.108 292.6727 L243.7595 283.4705 L239.7061 276.0189 L234.3583 267.3593 L229.5177 260.3928 L223.2807 252.3487 L217.7479 245.9188 L210.7356 238.5419 L203.3435 231.5435 L195.605 224.9307 L187.5489 218.7092 L179.2029 212.8819 L170.5936 207.4508 L161.7464 202.417 L152.6845 197.7803 L143.4305 193.5399 L134.0055 189.6945 L124.4294 186.2428 L114.7209 183.1822 L104.8978 180.5134 L94.9774 178.2313 L83.3022 176.0596 L73.2258 174.614 L61.4109 173.4145 L51.2501 172.8003 L39.9596 172.5777" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M268.0897 353.6667 L267.8539 345.1877 L266.9478 335.0498 L265.6821 326.6627 L263.5579 316.7085 L261.2979 308.5328 L258.0166 298.8979 L254.8251 291.039 L250.4715 281.8391 L246.425 274.3833 L241.0974 265.7103 L235.2846 257.3547 L229.0189 249.3337 L223.4724 242.9152 L216.4567 235.5413 L209.0732 228.5338 L201.3532 221.8995 L193.3237 215.6432 L185.0112 209.7681 L176.4407 204.2762 L166.1472 198.3543 L157.0971 193.6946 L147.8596 189.4183 L138.4545 185.5246 L127.2949 181.4635 L117.5896 178.3942 L106.1267 175.2893 L96.2001 173.0361 L84.5216 170.8797 L74.4452 169.4358 L62.6317 168.221 L50.7771 167.5101 L39.9596 167.3231" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M275.9453 353.6667 L275.7128 345.1876 L274.8238 335.0483 L273.5801 326.6576 L271.4966 316.6951 L269.2774 308.508 L266.0554 298.8528 L262.2498 289.4132 L257.8842 280.2183 L252.9893 271.2937 L247.5973 262.6609 L241.7371 254.3382 L235.439 246.3408 L228.7355 238.6812 L221.6553 231.3689 L214.2256 224.4115 L206.4724 217.8152 L198.4235 211.5837 L188.6913 204.7787 L180.0829 199.3463 L169.7592 193.4769 L160.6937 188.8472 L149.8916 183.9135 L140.46 180.0841 L129.2794 176.08 L119.563 173.0463 L108.0935 169.9652 L96.5027 167.3795 L84.813 165.2858 L74.7311 163.8809 L62.9145 162.6949 L51.0592 161.9976 L39.9596 161.8009" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M284.7035 353.6667 L284.4744 345.1875 L283.5989 335.0469 L282.0736 324.9837 L279.9138 315.0371 L277.6436 306.8643 L274.3724 297.2259 L270.5295 287.8004 L266.1436 278.6151 L261.2437 269.6934 L255.8601 261.0551 L250.0219 252.7169 L243.7595 244.6923 L237.1018 236.9927 L228.8712 228.432 L221.4517 221.4643 L212.4034 213.7738 L204.3385 207.5623 L194.6026 200.7624 L184.5462 194.446 L174.2012 188.6143 L165.1271 184.0012 L154.3243 179.0678 L143.3138 174.6191 L132.1208 170.6489 L120.7695 167.1589 L109.2822 164.1473 L97.6806 161.6091 L85.9854 159.5459 L74.2167 157.9545 L62.3938 156.833 L50.5358 156.1815 L39.9596 156.0198" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M294.6086 353.6667 L294.2811 343.4937 L293.3038 333.3625 L291.6852 323.3138 L289.4406 313.3859 L286.5901 303.6145 L283.1612 294.0312 L279.1791 284.6641 L274.6711 275.5374 L269.671 266.6718 L264.206 258.0843 L258.3067 249.7893 L250.9126 240.4966 L244.1701 232.872 L235.8649 224.3841 L228.3996 217.464 L219.319 209.8112 L209.8703 202.6158 L200.0897 195.8811 L190.0057 189.6087 L179.6477 183.7998 L169.043 178.4536 L158.2175 173.5723 L147.1951 169.1508 L135.9989 165.1908 L124.6508 161.6905 L113.1713 158.6467 L101.5807 156.0593 L88.2223 153.6602 L76.4566 152.045 L64.6378 150.8828 L52.7831 150.1719 L39.9596 149.9265" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M306.0288 353.6667 L305.7014 343.4937 L304.719 333.3628 L303.097 323.3147 L300.8506 313.3873 L298.0036 303.6153 L294.5815 294.0294 L290.6129 284.6558 L288.4344 280.0558 L285.3363 274.018 L280.2938 265.176 L277.6029 260.8558 L273.8465 255.2033 L267.8708 246.9628 L260.4157 237.7204 L252.477 228.8887 L244.0937 220.4771 L235.3033 212.4918 L226.1396 204.938 L216.6349 197.8195 L206.8166 191.1386 L196.7133 184.8969 L184.8511 178.3026 L174.2225 173.0039 L163.3855 168.1463 L152.3619 163.7282 L139.5616 159.2168 L128.2065 155.7386 L115.0775 152.2995 L103.4771 149.7545 L90.1143 147.3792 L78.3484 145.7656 L64.8399 144.4507 L52.9839 143.7636 L39.9596 143.516" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M319.5869 353.6667 L319.251 343.494 L318.2499 333.3652 L316.5957 323.3223 L314.3103 313.4037 L311.4209 303.6438 L309.7598 298.8328 L307.3302 292.4967 L303.2429 283.1744 L301.0101 278.6005 L297.8475 272.5965 L295.3398 268.1671 L291.8244 262.3619 L285.2277 252.488 L278.1017 242.9885 L270.4888 233.8734 L262.4313 225.1501 L253.9632 216.8246 L245.1168 208.9015 L239.9047 204.5561 L234.5822 200.3438 L225.0266 193.2943 L213.7489 185.7415 L203.5999 179.5751 L191.7073 173.0361 L181.0682 167.7578 L168.6703 162.2368 L157.6341 157.8493 L144.8313 153.3446 L133.4818 149.8478 L120.3655 146.3594 L107.1172 143.4106 L93.7602 141.0014 L80.3172 139.1317 L66.8102 137.8015 L53.261 137.0074 L39.9596 136.7563" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M336.4908 353.6667 L336.4009 348.5777 L336.1345 343.4949 L335.6917 338.4245 L335.0758 333.3723 L334.2868 328.3439 L333.3299 323.3448 L332.2101 318.3799 L330.4693 311.8206 L327.3542 302.1308 L325.5812 297.3599 L323.004 291.0821 L320.9188 286.4388 L317.9462 280.3384 L315.5777 275.8329 L312.2455 269.9212 L305.961 259.8451 L299.1472 250.1196 L291.8481 240.7516 L287.4758 235.5607 L282.9677 230.4887 L274.7644 221.9008 L264.939 212.5381 L254.6724 203.6615 L244.0021 195.2749 L232.9619 187.3818 L221.5807 179.9857 L209.8923 173.0887 L197.9198 166.6957 L185.6918 160.8049 L173.2325 155.423 L160.5655 150.5485 L147.7144 146.183 L134.7011 142.3265 L121.5476 138.9807 L108.2745 136.1455 L94.9028 133.8194 L81.4523 132.004 L67.9426 130.6992 L54.3934 129.9035 L39.9596 129.634" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M359.8556 353.6667 L359.7521 348.5781 L359.4399 343.498 L358.9207 338.4348 L358.2031 333.3961 L357.2903 328.389 L356.1891 323.4199 L354.9081 318.4939 L352.9349 312.0011 L351.2671 307.1921 L348.8103 300.8661 L346.8031 296.1887 L343.9239 290.0437 L341.6215 285.5048 L338.3707 279.5469 L332.2356 269.3798 L328.4944 263.7179 L324.5955 258.1633 L320.5489 252.7155 L316.3615 247.3739 L307.5999 237.0088 L298.3616 227.0663 L288.6872 217.5473 L278.6124 208.4537 L268.166 199.789 L262.8114 195.6188 L256.0026 190.5593 L244.8521 182.8208 L233.4047 175.5285 L221.6842 168.6842 L208.1967 161.5276 L195.9603 155.6555 L181.9418 149.6035 L169.2777 144.7222 L154.8263 139.7934 L141.8195 135.9148 L127.0295 132.121 L113.7628 129.2554 L98.7257 126.6035 L85.2794 124.7575 L70.0848 123.2525 L54.842 122.3567 L39.9596 122.0772" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M493.0134 353.6667 L493.1355 345.1845 L493.4969 336.7092 L494.0925 328.247 L495.0918 318.1166 L496.3745 308.018 L497.9049 297.9539 L499.6457 287.924 L501.8988 276.2632 L505.8029 258.013 L510.4042 238.18 L528.6315 164.037 L536.5447 131.0403 L543.0176 102.9333 L549.0405 75.5666" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M524.4594 353.6667 L524.5323 345.1837 L524.8106 335.0078 L525.8405 316.3738 L527.4913 297.7844 L529.8955 277.5674 L533.07 255.741 L536.9774 232.3114 L542.1658 203.9389 L549.0405 168.3724" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 105.5716 L48.4828 105.653 L58.6577 105.9669 L67.1295 106.408 L77.2819 107.1529 L85.7274 107.9537 L95.8392 109.1278 L105.9213 110.5343 L115.9684 112.1716 L124.3104 113.7139 L134.2797 115.7719 L144.1996 118.0591 L154.0649 120.5684 L162.2409 122.8318 L171.9942 125.7466 L181.6801 128.8787 L191.2946 132.2245 L199.2493 135.1716 L208.7233 138.8958 L218.1161 142.8202 L227.4257 146.938 L236.6505 151.2458 L245.787 155.7318 L254.8387 160.3926 L263.8039 165.2145 L280.0206 174.4495 L297.4217 185.0195 L313.1565 195.0565 L341.557 213.6253 L353.0333 220.8726 L363.2642 226.9048 L372.2633 231.6592 L378.429 234.494 L383.1593 236.373 L387.9897 237.9772 L392.9203 239.2362 L397.939 240.0682 L403.0171 240.3894 L408.0969 240.1274 L411.4496 239.6081 L414.7462 238.8117 L419.5443 237.1213 L422.6221 235.6927 L427.0334 233.1573 L429.8346 231.2432 L433.8319 228.0948 L437.6003 224.6744 L441.1599 221.037 L444.5328 217.2253 L448.7745 211.9283 L451.7861 207.8258 L455.607 202.2175 L459.2328 196.4802 L462.6855 190.6379 L465.9872 184.7087 L469.9269 177.1964 L473.6816 169.5885 L477.2734 161.9043 L480.7193 154.1522 L484.6811 144.7748 L492.1108 125.8196 L498.9789 106.6541 L505.8843 85.7053 L512.7847 62.9785 L519.6443 38.4701 L525.9012 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 96.5266 L55.2674 96.7693 L72.2122 97.6108 L87.4288 98.8799 L104.2794 100.8532 L119.378 103.1318 L136.062 106.2112 L150.9805 109.4654 L167.4336 113.6053 L183.7438 118.2762 L199.9003 123.4544 L215.8968 129.1095 L233.3046 135.835 L248.9682 142.357 L264.4911 149.2048 L279.9036 156.2985 L312.1385 171.4769 L324.4971 177.0878 L336.9981 182.3746 L348.1181 186.5435 L354.5722 188.6399 L361.1111 190.4565 L367.7366 191.9211 L372.7604 192.7377 L379.5149 193.3751 L384.6032 193.462 L389.683 193.172 L394.7238 192.4769 L399.6883 191.3613 L402.9374 190.3837 L406.1254 189.2237 L410.7759 187.1582 L413.7791 185.5789 L418.1276 182.9345 L420.9203 181.0071 L424.9499 177.8988 L428.7929 174.5614 L432.4577 171.0307 L435.9579 167.3353 L439.3037 163.4992 L442.507 159.5443 L446.5757 154.1132 L450.4338 148.5312 L454.1071 142.8236 L457.6107 137.0125 L460.9617 131.1115 L464.1752 125.1341 L468.0164 117.5704 L474.4977 103.7443 L481.1435 88.1349 L487.8878 70.7322 L494.1298 53.1446 L500.4499 33.7924 L506.3322 14.2994" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 86.8777 L53.5718 87.0525 L67.1346 87.575 L80.6796 88.4471 L94.1982 89.6619 L107.6816 91.2178 L121.1224 93.1079 L134.5128 95.3271 L149.5091 98.203 L164.4257 101.4674 L179.2568 105.0999 L193.9988 109.0786 L210.2741 113.87 L224.8332 118.4764 L239.3176 123.3136 L285.7198 139.6746 L300.1685 144.6136 L314.7328 149.1997 L326.1836 152.3504 L332.787 153.9147 L339.4396 155.2585 L346.1397 156.3325 L352.884 157.0824 L359.6605 157.4506 L364.7488 157.437 L371.5185 156.9874 L376.561 156.2985 L381.5492 155.289 L384.8322 154.4339 L388.0746 153.4328 L392.8456 151.6598 L395.9539 150.3008 L400.4992 148.012 L403.4447 146.3289 L407.7305 143.5837 L410.4977 141.619 L414.5103 138.4886 L418.3618 135.1615 L422.0571 131.6612 L425.6014 128.0083 L429.0049 124.223 L435.4167 116.32 L438.4418 112.2259 L442.3068 106.6473 L448.649 96.6081 L455.3287 84.7925 L461.491 72.7004 L467.9027 58.842 L473.8411 44.7749 L479.966 28.9535 L485.1912 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 76.5586 L51.8759 76.6774 L63.7469 77.0353 L75.6085 77.6309 L87.4559 78.4605 L99.2849 79.521 L111.0913 80.8104 L122.8713 82.3205 L134.6216 84.0477 L148.0107 86.2754 L161.3543 88.761 L174.6509 91.4876 L189.5535 94.8164 L202.7531 97.979 L217.5562 101.7252 L261.8171 113.5374 L276.6019 117.3549 L291.4596 120.8772 L303.0902 123.2763 L311.448 124.7304 L318.1668 125.6924 L324.911 126.4406 L331.6791 126.9326 L338.4623 127.1294 L343.5523 127.0565 L350.3237 126.6289 L355.3798 126.0385 L360.3985 125.1986 L363.7172 124.4945 L368.6443 123.2135 L371.885 122.2108 L378.2424 119.8389 L381.349 118.4747 L385.9079 116.2131 L388.8754 114.5673 L393.2121 111.9035 L400.1209 106.9832 L406.6259 101.542 L410.3382 98.0604 L413.9131 94.438 L420.6709 86.8268 L426.9486 78.8151 L432.7953 70.4828 L439.1374 60.4419 L445.0232 50.1279 L451.2686 38.0765 L457.0661 25.8045 L462.068 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 65.4963 L51.8761 65.5998 L63.7484 65.9103 L75.6137 66.4278 L87.4685 67.1489 L99.3094 68.0668 L111.1336 69.1798 L122.9388 70.4811 L136.4046 72.1846 L158.2232 75.4116 L179.964 79.1307 L201.6379 83.2197 L243.2437 91.474 L259.9236 94.5755 L274.9934 97.0407 L288.4497 98.8104 L300.2772 99.8911 L312.1419 100.3849 L318.9269 100.3408 L324.0135 100.1253 L329.0883 99.7384 L334.146 99.1667 L342.5106 97.7652 L350.7513 95.7598 L358.8105 93.1163 L365.0864 90.5374 L371.1791 87.553 L378.5054 83.2791 L384.1145 79.4599 L390.796 74.2358 L397.1127 68.5741 L403.0714 62.539 L408.6907 56.185 L415.0193 48.2124 L419.9736 41.3273 L425.5709 32.8236 L430.8238 24.1061 L436.2453 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 53.601 L60.3578 53.8589 L80.703 54.6224 L101.0238 55.8779 L123.0001 57.7527 L141.5598 59.7158 L161.7691 62.1861 L218.9033 70.1469 L235.7241 72.3695 L250.894 74.1103 L262.7214 75.1894 L276.2693 76.0055 L288.1426 76.2311 L298.3175 75.9614 L308.4669 75.1707 L316.874 74.0492 L323.5452 72.8107 L330.1487 71.2463 L336.6605 69.3359 L344.6348 66.4448 L350.8514 63.7267 L356.9 60.6506 L362.762 57.2319 L368.4204 53.4873 L373.8684 49.4408 L379.0992 45.1194 L385.3345 39.3676 L391.2388 33.2783 L396.8277 26.8971 L402.1179 20.2649 L406.4881 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 40.7759 L56.9659 40.9184 L75.6227 41.3986 L92.5739 42.1196 L111.2057 43.2004 L143.3475 45.664 L207.5523 51.5412 L221.0852 52.5898 L232.9381 53.3261 L246.4996 53.8741 L258.3763 54.0065 L268.5529 53.7893 L278.7142 53.1938 L285.4703 52.5541 L292.2027 51.6905 L298.8978 50.5843 L305.5436 49.2134 L312.125 47.5592 L318.6232 45.6029 L325.0197 43.3362 L329.7364 41.4257 L335.9055 38.5957 L340.4305 36.2661 L344.8605 33.7602 L350.6088 30.1548 L354.7961 27.2602 L360.2068 23.1645 L365.4156 18.8176 L370.3644 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M40 26.9005 L68.8413 27.1975 L97.6716 28.0526 L124.7907 29.2691 L179.0081 32.1398 L201.0471 33.0136 L212.9209 33.2749 L223.1009 33.3258 L233.2792 33.1748 L241.7557 32.8592 L253.6052 32.0686 L265.4124 30.7859 L275.4702 29.2233 L285.4398 27.1652 L295.2771 24.5541 L304.9345 21.3406 L309.6784 19.4963 L314.3578 17.4925 L320.9536 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M422.3676 353.6667 L414.1812 340.1275 L405.048 325.83 L395.5331 311.7826 L386.6358 299.3728 L376.3709 285.8648 L366.7831 273.9805 L356.861 262.3745 L346.5995 251.067 L335.9971 240.0786 L325.0536 229.4296 L313.7708 219.1415 L303.4584 210.3161 L291.5461 200.7659 L280.6823 192.6286 L268.1626 183.888 L256.778 176.499 L243.6916 168.6316 L231.8234 162.0451 L218.2213 155.1075 L205.9208 149.371 L191.8634 143.4089 L179.1877 138.5565 L164.7428 133.6073 L151.7545 129.6676 L138.6418 126.1657 L125.4192 123.1015 L112.1017 120.4819 L97.0248 118.0675 L83.5555 116.3963 L68.3455 115.0526 L54.7917 114.3366 L39.9596 114.0761" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M422.3676 353.6667 L431.8842 336.9903 L440.7119 320.5477 L449.8909 302.3742 L458.6169 283.9795 L466.9119 265.3871 L475.441 245.0464 L483.5171 224.522 L491.1674 203.8351 L498.4173 183.0041 L505.8029 160.4282 L512.7778 137.7234 L519.8275 113.2694 L526.4666 88.6999 L532.7222 64.0321 L538.6249 39.276 L544.217 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><line y2="353.6667" style="fill:none;" x1="209.6667" x2="141.8" y1="353.6667"
|
||||
/><path d="M207.0891 330.0967 L187.2194 334.5385 L172.3615 338.0613 L160.8772 341.0863 L152.7706 343.5833 L146.4441 346.0327 L143.422 347.5726 L141.9902 348.4821 L140.6522 349.5237 L139.4576 350.7266 L138.4559 352.094 L137.6476 353.5847 L136.9133 353.6678" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M199.4346 307.2432 L180.9423 315.7614 L167.2028 322.4237 L156.7027 327.9717 L152.2947 330.5165 L147.976 333.2098 L143.7883 336.1021 L141.1013 338.1739 L138.5302 340.3876 L136.1102 342.7654 L133.8774 345.3194 L131.853 348.0416 L128.3526 353.6671" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M186.9356 285.8 L169.1226 298.8072 L156.9975 308.0881 L146.5415 316.7409 L139.0562 323.6382 L135.4887 327.2686 L132.0778 331.046 L128.8568 334.9864 L126.8298 337.7076 L124.9063 340.5029 L122.2162 344.8232 L117.4515 353.6672" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M169.9721 266.419 L154.8258 282.4525 L143.4274 295.0193 L134.6416 305.3646 L127.3503 314.7383 L121.5225 323.0836 L116.1968 331.7574 L113.7468 336.2187 L110.7045 342.2847 L108.5827 346.9112 L105.9432 353.1631 L105.3123 353.6674" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M149.0597 249.6888 L135.8942 269.4597 L126.7244 283.7346 L119.6704 295.3305 L112.9967 307.149 L107.5762 317.7155 L103.3081 326.9569 L100.6743 333.2115 L98.2123 339.5355 L93.2587 353.6666 L92.7512 353.6678" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M124.8333 236.1182 L114.2236 259.2511 L107.3388 274.7579 L101.3988 288.825 L96.4157 301.45 L91.7938 314.2117 L88.0981 325.4983 L84.3025 338.5293 L80.5627 353.3334 L80.1784 353.6675" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M98.0294 226.1191 L86.3511 266.8961 L82.3736 281.6388 L78.6182 296.4396 L75.518 309.6539 L73.0199 321.2647 L70.126 336.2577 L67.3262 352.9912 L67.0686 353.6663 L66.8138 353.667" style="fill:none; fill-rule:evenodd;"
|
||||
/><path d="M69.4623 219.9955 L63.3962 263.6895 L59.3391 295.6697 L56.3967 322.656 L53.599 353.6668" style="fill:none; fill-rule:evenodd;"
|
||||
/><line y2="353.6667" style="fill:none;" x1="40" x2="40" y1="217.9333"
|
||||
/><path d="M195.2145 353.6667 L195.0738 348.5793 L194.4505 341.8228 L193.6605 336.795 L192.1878 330.1717 L190.7778 325.2814 L188.5077 318.887 L186.5251 314.1996 L183.5293 308.1113 L181.0325 303.6762 L177.3916 297.9502 L173.4191 292.4489 L169.1409 287.1816 L164.5822 282.1549 L159.7665 277.3738 L154.7164 272.8414 L149.4523 268.559 L143.9936 264.5274 L138.3583 260.7463 L132.5632 257.2152 L125.1177 253.1514 L119.0173 250.1785 L112.8035 247.4509 L106.488 244.9673 L98.4683 242.2035 L91.9653 240.2628 L83.7443 238.1725 L77.1051 236.7673 L68.7429 235.3427 L62.0134 234.467 L53.5653 233.7016 L46.788 233.352 L39.9596 233.264" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M183.7582 353.6667 L183.5904 348.5804 L183.0889 343.516 L182.2594 338.4949 L181.1113 333.5371 L179.6567 328.6602 L177.9097 323.8802 L175.886 319.2104 L172.7861 313.1749 L170.1817 308.8022 L166.3677 303.1903 L163.2717 299.1509 L158.8578 293.9969 L155.3509 290.3082 L150.4376 285.6278 L146.5897 282.2964 L141.2625 278.0927 L137.1325 275.1183 L131.4631 271.3889 L125.6262 267.9275 L119.6395 264.7321 L113.5193 261.8003 L107.2808 259.1296 L100.9376 256.7174 L94.5029 254.562 L87.9885 252.6607 L81.4055 251.0121 L74.7647 249.6142 L68.0764 248.4657 L61.3502 247.5653 L54.5954 246.9121 L47.8212 246.5055 L39.9596 246.3552" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M174.4859 353.6667 L174.3957 350.2749 L173.9235 345.2082 L173.0565 340.1939 L171.8105 335.26 L170.2068 330.4305 L168.2694 325.7246 L166.0245 321.1573 L163.4975 316.7397 L160.7134 312.4796 L157.6954 308.3818 L154.4646 304.4491 L149.8598 299.4651 L146.2059 295.9223 L142.3974 292.5461 L138.4482 289.3355 L132.9851 285.31 L128.7543 282.4808 L122.9543 278.9582 L118.4966 276.5014 L112.4253 273.4702 L107.7854 271.3778 L101.497 268.8269 L95.1055 266.5462 L88.6249 264.5328 L83.7136 263.1967 L77.1071 261.6452 L70.4446 260.3551 L63.7372 259.3245 L58.6832 258.721 L51.9217 258.1418 L45.1431 257.8192 L39.9596 257.7688" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M166.8823 353.6667 L166.7709 350.2758 L166.1904 345.221 L165.5367 341.8918 L164.1787 336.988 L163.0382 333.7926 L161.0058 329.1274 L159.4545 326.1099 L156.8625 321.7303 L153.9856 317.5326 L150.8563 313.519 L147.5037 309.6899 L143.9524 306.0443 L140.2238 302.58 L136.3367 299.2946 L132.3073 296.1853 L128.1496 293.2497 L123.8764 290.4848 L119.4988 287.8884 L115.0268 285.4579 L108.933 282.472 L104.275 280.4207 L97.9612 277.9334 L93.1572 276.2515 L86.6728 274.251 L81.7572 272.9306 L75.1441 271.4077 L70.1465 270.4426 L63.4425 269.3904 L58.3898 268.7763 L51.629 268.19 L46.5461 267.9243 L39.9596 267.8048" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M160.6028 353.6667 L160.4615 350.2773 L160.0417 346.9109 L159.3554 343.5886 L157.8652 338.7242 L156.5951 335.5782 L155.1288 332.5186 L153.4866 329.5496 L150.7336 325.2699 L148.7282 322.5328 L145.4984 318.5999 L143.214 316.0911 L139.6138 312.4938 L135.8291 309.091 L131.882 305.878 L127.7913 302.8498 L123.5727 300.0023 L119.2399 297.3319 L114.8048 294.8351 L110.2778 292.5088 L105.6685 290.3505 L100.985 288.3575 L96.2355 286.5279 L91.4268 284.8597 L84.9347 282.8838 L75.053 280.4452 L70.0595 279.4596 L63.3589 278.3857 L58.3075 277.7598 L51.5477 277.1631 L46.465 276.8937 L39.9596 276.7762" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M155.41 353.6667 L155.3633 351.9709 L154.994 348.5993 L154.2759 345.2843 L153.2444 342.0528 L151.9395 338.9214 L150.4006 335.8978 L148.662 332.9845 L145.7412 328.8176 L143.618 326.171 L140.2117 322.3898 L137.813 319.9901 L134.0491 316.5645 L130.1112 313.3403 L126.0222 310.3101 L121.8002 307.4676 L117.4606 304.8081 L110.0018 300.77 L105.4082 298.5781 L100.7374 296.5557 L95.998 294.7004 L91.1973 293.0098 L81.439 290.116 L71.5137 287.8615 L61.4657 286.2372 L51.3366 285.2369 L46.2539 284.9693 L39.9596 284.8618" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M151.1405 353.6667 L151.0752 351.9717 L150.5653 348.6199 L149.6042 345.3679 L148.2757 342.247 L146.6586 339.265 L144.8141 336.4175 L142.7876 333.6964 L140.6115 331.0932 L138.3094 328.6006 L134.6582 325.0555 L132.1107 322.8141 L128.1439 319.6258 L121.2033 314.7513 L113.9244 310.3974 L106.3699 306.5411 L101.7258 304.4586 L97.009 302.5461 L92.2278 300.8009 L87.3894 299.2211 L77.5679 296.5503 L69.2648 294.8157 L59.1976 293.3164 L49.0564 292.4464 L39.9596 292.2284" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M147.6857 353.6667 L147.5855 351.9739 L147.2933 350.3035 L146.8316 348.6715 L145.5069 345.5508 L143.8002 342.6198 L141.8339 339.8553 L139.68 337.2338 L137.3815 334.7382 L134.9655 332.3557 L131.1605 328.9758 L128.5214 326.8432 L124.4311 323.8147 L117.3166 319.1975 L109.8949 315.0916 L102.2224 311.4756 L94.3434 308.3344 L86.2947 305.6571 L76.4576 303.0444 L68.1443 301.3601 L58.0678 299.9231 L49.6156 299.2089 L39.9596 298.9434" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M144.9865 353.6667 L144.807 351.9826 L144.3155 350.3607 L143.6029 348.8221 L141.7842 345.9605 L139.6669 343.3099 L137.37 340.8128 L132.4186 336.1745 L127.1218 331.9339 L120.1327 327.1291 L112.8164 322.8387 L105.2328 319.0397 L97.4284 315.7173 L89.4421 312.8601 L81.3064 310.46 L73.0512 308.5104 L64.7033 307.0065 L56.2877 305.9442 L47.8282 305.3214 L39.9596 305.1496" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M143.0408 353.6667 L142.6229 352.0374 L141.7282 350.5985 L140.6642 349.2775 L138.3364 346.8095 L133.3133 342.2486 L126.6089 337.0543 L120.9804 333.2641 L113.6686 328.9654 L107.6296 325.8698 L99.8801 322.422 L93.5424 319.996 L85.4759 317.3733 L78.9258 315.5994 L70.6401 313.7836 L63.9493 312.6499 L55.5286 311.6289 L47.0662 311.0462 L39.9596 310.9243" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M141.9424 353.6667 L140.7696 352.491 L131.3182 345.2996 L125.7623 341.403 L120.0331 337.7659 L114.1364 334.4076 L108.0857 331.3351 L101.8973 328.5506 L95.5874 326.0538 L89.1713 323.8437 L82.6637 321.9188 L76.0791 320.2778 L67.7595 318.6234 L61.0487 317.6159 L54.3016 316.8884 L47.5302 316.4398 L39.9596 316.2891" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M138.5429 353.6667 L135.5478 352.0761 L121.1597 343.0869 L112.2256 338.2103 L106.1025 335.2852 L101.4283 333.2704 L96.6902 331.4113 L90.2826 329.1766 L85.4165 327.6843 L78.8588 325.9389 L72.2328 324.473 L65.5513 323.2858 L58.8262 322.3766 L52.0695 321.7451 L45.2926 321.3906 L39.9596 321.3297" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M132.2571 353.6667 L118.9607 346.1593 L112.9355 343.0365 L108.3411 340.8463 L102.1148 338.1471 L97.374 336.2952 L87.7279 333.0466 L82.8329 331.6526 L76.2423 330.0343 L71.2585 329.0012 L64.5682 327.8644 L59.523 327.1927 L52.7685 326.5377 L45.9929 326.1574 L39.9596 326.0639" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M125.5106 353.6667 L113.44 347.4614 L104.1533 343.2944 L97.8351 340.8181 L93.0336 339.1294 L83.2864 336.1983 L73.3773 333.8722 L68.374 332.9378 L61.663 331.93 L51.534 330.9284 L46.4514 330.6577 L39.9596 330.5401" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M118.1841 353.6667 L108.9537 349.3753 L99.5211 345.55 L89.8852 342.2711 L80.0709 339.5727 L70.1119 337.4701 L60.0446 335.9701 L49.9055 335.0758 L39.9596 334.7948" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M110.0959 353.6667 L100.6553 349.8605 L92.6411 347.081 L82.862 344.2575 L74.5974 342.3473 L66.2486 340.8472 L57.836 339.7611 L49.38 339.0911 L39.9596 338.8563" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M100.9436 353.6667 L92.9177 350.9204 L84.7732 348.5496 L76.5247 346.5711 L69.8629 345.2776 L61.4732 344.0269 L54.7236 343.3216 L47.9518 342.8798 L39.9596 342.7095" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M90.1477 353.6667 L83.6035 351.8702 L76.9963 350.3214 L70.335 349.0255 L65.309 348.2217 L58.5756 347.3762 L51.8148 346.7906 L45.0363 346.4659 L39.9596 346.394" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M76.2695 353.6667 L66.2485 351.8825 L57.8311 350.8329 L47.6786 350.1035 L39.9596 349.9543" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><path d="M50.7775 353.6667 L43.997 353.3881 L39.9596 353.3555" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
|
||||
/><line x1="40" x2="141.8" y1="353.6667" style="fill:none; stroke:black; stroke-width:1.3333;" y2="353.6667"
|
||||
/></g
|
||||
></g
|
||||
></svg
|
||||
>
|
||||
|
After Width: | Height: | Size: 50 KiB |
|
|
@ -1,364 +0,0 @@
|
|||
/**
|
||||
* DMS.js
|
||||
* Transcription of DMS.[ch]pp into JavaScript.
|
||||
*
|
||||
* See the documentation for the C++ class. The conversion is a literal
|
||||
* conversion from C++.
|
||||
*
|
||||
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed
|
||||
* under the MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
**********************************************************************/
|
||||
|
||||
GeographicLib.DMS = {};
|
||||
|
||||
(function() {
|
||||
var d = GeographicLib.DMS;
|
||||
var m = GeographicLib.Math;
|
||||
d.lookup = function(s, c) {
|
||||
return s.indexOf(c.toUpperCase());
|
||||
}
|
||||
d.zerofill = function(s, n) {
|
||||
return String("0000").substr(0, Math.max(0, Math.min(4, n-s.length))) +
|
||||
s;
|
||||
}
|
||||
d.hemispheres_ = "SNWE";
|
||||
d.signs_ = "-+";
|
||||
d.digits_ = "0123456789";
|
||||
d.dmsindicators_ = "D'\":";
|
||||
// d.dmsindicatorsu_ = "\u00b0\u2032\u2033"; // Unicode variants
|
||||
d.dmsindicatorsu_ = "\u00b0'\""; // Use degree symbol
|
||||
d.components_ = ["degrees", "minutes", "seconds"];
|
||||
d.NONE = 0;
|
||||
d.LATITUDE = 1;
|
||||
d.LONGITUDE = 2;
|
||||
d.AZIMUTH = 3;
|
||||
d.NUMBER = 4;
|
||||
d.DEGREE = 0;
|
||||
d.MINUTE = 1;
|
||||
d.SECOND = 2;
|
||||
|
||||
// return val, ind
|
||||
d.Decode = function(dms) {
|
||||
var vals = {};
|
||||
var errormsg = new String("");
|
||||
var dmsa = dms;
|
||||
dmsa = dmsa.replace(/\u00b0/g, 'd');
|
||||
dmsa = dmsa.replace(/\u00ba/g, 'd');
|
||||
dmsa = dmsa.replace(/\u2070/g, 'd');
|
||||
dmsa = dmsa.replace(/\u02da/g, 'd');
|
||||
dmsa = dmsa.replace(/\u2032/g, '\'');
|
||||
dmsa = dmsa.replace(/\u00b4/g, '\'');
|
||||
dmsa = dmsa.replace(/\u2019/g, '\'');
|
||||
dmsa = dmsa.replace(/\u2033/g, '"');
|
||||
dmsa = dmsa.replace(/\u201d/g, '"');
|
||||
dmsa = dmsa.replace(/''/g, '"');
|
||||
dmsa = dmsa.replace(/^\s+/, "");
|
||||
dmsa = dmsa.replace(/\s+$/, "");
|
||||
do { // Executed once (provides the ability to break)
|
||||
var sign = 1;
|
||||
var beg = 0, end = dmsa.length;
|
||||
var ind1 = d.NONE;
|
||||
var k = -1;
|
||||
if (end > beg && (k = d.lookup(d.hemispheres_, dmsa.charAt(beg))) >= 0) {
|
||||
ind1 = (k & 2) ? d.LONGITUDE : d.LATITUDE;
|
||||
sign = (k & 1) ? 1 : -1;
|
||||
++beg;
|
||||
}
|
||||
if (end > beg &&
|
||||
(k = d.lookup(d.hemispheres_, dmsa.charAt(end-1))) >= 0) {
|
||||
if (k >= 0) {
|
||||
if (ind1 != d.NONE) {
|
||||
if (dmsa.charAt(beg - 1).toUpperCase() ==
|
||||
dmsa.charAt(end - 1).toUpperCase())
|
||||
errormsg = "Repeated hemisphere indicators " +
|
||||
dmsa.charAt(beg - 1) + " in " +
|
||||
dmsa.substr(beg - 1, end - beg + 1);
|
||||
else
|
||||
errormsg = "Contradictory hemisphere indicators " +
|
||||
dmsa.charAt(beg - 1) + " and " + dmsa.charAt(end - 1) + " in " +
|
||||
dmsa.substr(beg - 1, end - beg + 1);
|
||||
break;
|
||||
}
|
||||
ind1 = (k & 2) ? d.LONGITUDE : d.LATITUDE;
|
||||
sign = (k & 1) ? 1 : -1;
|
||||
--end;
|
||||
}
|
||||
}
|
||||
if (end > beg && (k = d.lookup(d.signs_, dmsa.charAt(beg))) >= 0) {
|
||||
if (k >= 0) {
|
||||
sign *= k ? 1 : -1;
|
||||
++beg;
|
||||
}
|
||||
}
|
||||
if (end == beg) {
|
||||
errormsg = "Empty or incomplete DMS string " + dmsa;
|
||||
break;
|
||||
}
|
||||
var ipieces = [0, 0, 0];
|
||||
var fpieces = [0, 0, 0];
|
||||
var npiece = 0;
|
||||
var icurrent = 0;
|
||||
var fcurrent = 0;
|
||||
var ncurrent = 0, p = beg;
|
||||
var pointseen = false;
|
||||
var digcount = 0;
|
||||
var intcount = 0;
|
||||
while (p < end) {
|
||||
var x = dmsa.charAt(p++);
|
||||
if ((k = d.lookup(d.digits_, x)) >= 0) {
|
||||
++ncurrent;
|
||||
if (digcount > 0)
|
||||
++digcount; // Count of decimal digits
|
||||
else {
|
||||
icurrent = 10 * icurrent + k;
|
||||
++intcount;
|
||||
}
|
||||
} else if (x == '.') {
|
||||
if (pointseen) {
|
||||
errormsg = "Multiple decimal points in "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
pointseen = true;
|
||||
digcount = 1;
|
||||
} else if ((k = d.lookup(d.dmsindicators_, x)) >= 0) {
|
||||
if (k >= 3) {
|
||||
if (p == end) {
|
||||
errormsg = "Illegal for : to appear at the end of " +
|
||||
dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
k = npiece;
|
||||
}
|
||||
if (k == npiece - 1) {
|
||||
errormsg = "Repeated " + d.components_[k] +
|
||||
" component in " + dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
} else if (k < npiece) {
|
||||
errormsg = d.components_[k] + " component follows "
|
||||
+ d.components_[npiece - 1] + " component in "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
if (ncurrent == 0) {
|
||||
errormsg = "Missing numbers in " + d.components_[k] +
|
||||
" component of " + dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
if (digcount > 1) {
|
||||
fcurrent = parseFloat(dmsa.substr(p - intcount - digcount - 1,
|
||||
intcount + digcount));
|
||||
icurrent = 0;
|
||||
}
|
||||
ipieces[k] = icurrent;
|
||||
fpieces[k] = icurrent + fcurrent;
|
||||
if (p < end) {
|
||||
npiece = k + 1;
|
||||
icurrent = fcurrent = 0;
|
||||
ncurrent = digcount = intcount = 0;
|
||||
}
|
||||
} else if (d.lookup(d.signs_, x) >= 0) {
|
||||
errormsg = "Internal sign in DMS string "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
} else {
|
||||
errormsg = "Illegal character " + x + " in DMS string "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (errormsg.length)
|
||||
break;
|
||||
if (d.lookup(d.dmsindicators_, dmsa.charAt(p - 1)) < 0) {
|
||||
if (npiece >= 3) {
|
||||
errormsg = "Extra text following seconds in DMS string "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
if (ncurrent == 0) {
|
||||
errormsg = "Missing numbers in trailing component of "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
if (digcount > 1) {
|
||||
fcurrent = parseFloat(dmsa.substr(p - intcount - digcount,
|
||||
intcount + digcount));
|
||||
icurrent = 0;
|
||||
}
|
||||
ipieces[npiece] = icurrent;
|
||||
fpieces[npiece] = icurrent + fcurrent;
|
||||
}
|
||||
if (pointseen && digcount == 0) {
|
||||
errormsg = "Decimal point in non-terminal component of "
|
||||
+ dmsa.substr(beg, end - beg);
|
||||
break;
|
||||
}
|
||||
// Note that we accept 59.999999... even though it rounds to 60.
|
||||
if (ipieces[1] >= 60) {
|
||||
errormsg = "Minutes " + fpieces[1] + " not in range [0, 60)";
|
||||
break;
|
||||
}
|
||||
if (ipieces[2] >= 60) {
|
||||
errormsg = "Seconds " + fpieces[2] + " not in range [0, 60)";
|
||||
break;
|
||||
}
|
||||
vals.ind = ind1;
|
||||
// Assume check on range of result is made by calling routine (which
|
||||
// might be able to offer a better diagnostic).
|
||||
vals.val = sign * (fpieces[0] + (fpieces[1] + fpieces[2] / 60) / 60);
|
||||
return vals;
|
||||
} while (false);
|
||||
vals.val = d.NumMatch(dmsa);
|
||||
if (vals.val == 0)
|
||||
throw new Error(errormsg);
|
||||
else
|
||||
vals.ind = d.NONE;
|
||||
return vals;
|
||||
}
|
||||
|
||||
d.NumMatch = function(s) {
|
||||
if (s.length < 3)
|
||||
return 0;
|
||||
var t = s.toUpperCase().replace(/0+$/,"");
|
||||
var sign = t.charAt(0) == '-' ? -1 : 1;
|
||||
var p0 = t.charAt(0) == '-' || t.charAt(0) == '+' ? 1 : 0;
|
||||
var p1 = t.length - 1;
|
||||
if (p1 + 1 < p0 + 3)
|
||||
return 0;
|
||||
// Strip off sign and trailing 0s
|
||||
t = t.substr(p0, p1 + 1 - p0); // Length at least 3
|
||||
if (t == "NAN" || t == "1.#QNAN" || t == "1.#SNAN" || t == "1.#IND" ||
|
||||
t == "1.#R")
|
||||
return sign * Number.NaN;
|
||||
else if (t == "INF" || t == "1.#INF")
|
||||
return sign * Number.POSITIVE_INFINITY;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return lat, lon
|
||||
d.DecodeLatLon = function(stra, strb, swaplatlong) {
|
||||
var vals = {};
|
||||
if (!swaplatlong) swaplatlong = false;
|
||||
var valsa = d.Decode(stra);
|
||||
var valsb = d.Decode(strb);
|
||||
var a = valsa.val, ia = valsa.ind;
|
||||
var b = valsb.val, ib = valsb.ind;
|
||||
if (ia == d.NONE && ib == d.NONE) {
|
||||
// Default to lat, long unless swaplatlong
|
||||
ia = swaplatlong ? d.LONGITUDE : d.LATITUDE;
|
||||
ib = swaplatlong ? d.LATITUDE : d.LONGITUDE;
|
||||
} else if (ia == d.NONE)
|
||||
ia = d.LATITUDE + d.LONGITUDE - ib;
|
||||
else if (ib == d.NONE)
|
||||
ib = d.LATITUDE + d.LONGITUDE - ia;
|
||||
if (ia == ib)
|
||||
throw new Error("Both " + stra + " and "
|
||||
+ strb + " interpreted as "
|
||||
+ (ia == d.LATITUDE ? "latitudes" : "longitudes"));
|
||||
var lat = ia == d.LATITUDE ? a : b, lon = ia == d.LATITUDE ? b : a;
|
||||
if (Math.abs(lat) > 90)
|
||||
throw new Error("Latitude " + lat + "d not in [-90d, 90d]");
|
||||
if (lon < -540 || lon >= 540)
|
||||
throw new Error("Latitude " + lon + "d not in [-540d, 540d)");
|
||||
lon = m.AngNormalize(lon);
|
||||
vals.lat = lat;
|
||||
vals.lon = lon;
|
||||
return vals;
|
||||
}
|
||||
|
||||
d.DecodeAngle = function(angstr) {
|
||||
var vals = d.Decode(angstr);
|
||||
var ang = vals.val, ind = vals.ind;
|
||||
if (ind != d.NONE)
|
||||
throw new Error("Arc angle " + angstr
|
||||
+ " includes a hemisphere, N/E/W/S");
|
||||
return ang;
|
||||
}
|
||||
|
||||
d.DecodeAzimuth = function(azistr) {
|
||||
var vals = d.Decode(azistr);
|
||||
var azi = vals.val, ind = vals.ind;
|
||||
if (ind == d.LATITUDE)
|
||||
throw new Error("Azimuth " + azistr
|
||||
+ " has a latitude hemisphere, N/S");
|
||||
if (azi < -540 || azi >= 540)
|
||||
throw new Error("Azimuth " + azistr + " not in range [-540d, 540d)");
|
||||
azi = m.AngNormalize(azi);
|
||||
return azi;
|
||||
}
|
||||
|
||||
d.Encode = function(angle, trailing, prec, ind) {
|
||||
// Assume check on range of input angle has been made by calling
|
||||
// routine (which might be able to offer a better diagnostic).
|
||||
if (!ind) ind = d.NONE;
|
||||
if (!isFinite(angle))
|
||||
return angle < 0 ? String("-inf") :
|
||||
(angle > 0 ? String("inf") : String("nan"));
|
||||
|
||||
// 15 - 2 * trailing = ceiling(log10(2^53/90/60^trailing)).
|
||||
// This suffices to give full real precision for numbers in [-90,90]
|
||||
prec = Math.min(15 - 2 * trailing, prec);
|
||||
var scale = 1, i;
|
||||
for (i = 0; i < trailing; ++i)
|
||||
scale *= 60;
|
||||
for (i = 0; i < prec; ++i)
|
||||
scale *= 10;
|
||||
if (ind == d.AZIMUTH)
|
||||
angle -= Math.floor(angle/360) * 360;
|
||||
var sign = angle < 0 ? -1 : 1;
|
||||
angle *= sign;
|
||||
|
||||
// Break off integer part to preserve precision in manipulation of
|
||||
// fractional part.
|
||||
var
|
||||
idegree = Math.floor(angle),
|
||||
fdegree = Math.floor((angle - idegree) * scale + 0.5) / scale;
|
||||
if (fdegree >= 1) {
|
||||
idegree += 1;
|
||||
fdegree -= 1;
|
||||
}
|
||||
var pieces = [fdegree, 0, 0];
|
||||
for (i = 1; i <= trailing; ++i) {
|
||||
var
|
||||
ip = Math.floor(pieces[i - 1]),
|
||||
fp = pieces[i - 1] - ip;
|
||||
pieces[i] = fp * 60;
|
||||
pieces[i - 1] = ip;
|
||||
}
|
||||
pieces[0] += idegree;
|
||||
var s = new String("");
|
||||
if (ind == d.NONE && sign < 0)
|
||||
s += '-';
|
||||
switch (trailing) {
|
||||
case d.DEGREE:
|
||||
s += d.zerofill(pieces[0].toFixed(prec),
|
||||
ind == d.NONE ? 0 :
|
||||
1 + Math.min(ind, 2) + prec + (prec ? 1 : 0)) +
|
||||
d.dmsindicatorsu_.charAt(0);
|
||||
break;
|
||||
default:
|
||||
s += d.zerofill(pieces[0].toFixed(0),
|
||||
ind == d.NONE ? 0 : 1 + Math.min(ind, 2)) +
|
||||
d.dmsindicatorsu_.charAt(0);
|
||||
switch (trailing) {
|
||||
case d.MINUTE:
|
||||
s += d.zerofill(pieces[1].toFixed(prec), 2 + prec + (prec ? 1 : 0)) +
|
||||
d.dmsindicatorsu_.charAt(1);
|
||||
break;
|
||||
case d.SECOND:
|
||||
s += d.zerofill(pieces[1].toFixed(0), 2) + d.dmsindicatorsu_.charAt(1);
|
||||
s += d.zerofill(pieces[2].toFixed(prec), 2 + prec + (prec ? 1 : 0)) +
|
||||
d.dmsindicatorsu_.charAt(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ind != d.NONE && ind != d.AZIMUTH)
|
||||
s += d.hemispheres_.charAt((ind == d.LATITUDE ? 0 : 2) +
|
||||
(sign < 0 ? 0 : 1));
|
||||
return s;
|
||||
}
|
||||
|
||||
})();
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,294 +0,0 @@
|
|||
/**
|
||||
* GeodesicLine.js
|
||||
* Transcription of GeodesicLine.[ch]pp into JavaScript.
|
||||
*
|
||||
* See the documentation for the C++ class. The conversion is a literal
|
||||
* conversion from C++.
|
||||
*
|
||||
* The algorithms are derived in
|
||||
*
|
||||
* Charles F. F. Karney,
|
||||
* Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
|
||||
* http://dx.doi.org/10.1007/s00190-012-0578-z
|
||||
* Addenda: http://geographiclib.sf.net/geod-addenda.html
|
||||
*
|
||||
* Copyright (c) Charles Karney (2011-2012) <charles@karney.com> and licensed
|
||||
* under the MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
**********************************************************************/
|
||||
|
||||
// Load AFTER GeographicLib/Math.js and GeographicLib/Geodesic.js
|
||||
|
||||
(function() {
|
||||
var g = GeographicLib.Geodesic;
|
||||
var l = GeographicLib.GeodesicLine;
|
||||
var m = GeographicLib.Math;
|
||||
|
||||
l.GeodesicLine = function(geod, lat1, lon1, azi1, caps) {
|
||||
this._a = geod._a;
|
||||
this._f = geod._f;
|
||||
this._b = geod._b;
|
||||
this._c2 = geod._c2;
|
||||
this._f1 = geod._f1;
|
||||
this._caps = !caps ? g.ALL : (caps | g.LATITUDE | g.AZIMUTH);
|
||||
|
||||
azi1 = g.AngRound(m.AngNormalize(azi1));
|
||||
lon1 = m.AngNormalize(lon1);
|
||||
this._lat1 = lat1;
|
||||
this._lon1 = lon1;
|
||||
this._azi1 = azi1;
|
||||
// alp1 is in [0, pi]
|
||||
var alp1 = azi1 * m.degree;
|
||||
// Enforce sin(pi) == 0 and cos(pi/2) == 0. Better to face the ensuing
|
||||
// problems directly than to skirt them.
|
||||
this._salp1 = azi1 == -180 ? 0 : Math.sin(alp1);
|
||||
this._calp1 = Math.abs(azi1) == 90 ? 0 : Math.cos(alp1);
|
||||
var cbet1, sbet1, phi;
|
||||
phi = lat1 * m.degree;
|
||||
// Ensure cbet1 = +epsilon at poles
|
||||
sbet1 = this._f1 * Math.sin(phi);
|
||||
cbet1 = Math.abs(lat1) == 90 ? g.tiny_ : Math.cos(phi);
|
||||
// SinCosNorm(sbet1, cbet1);
|
||||
var t = m.hypot(sbet1, cbet1); sbet1 /= t; cbet1 /= t;
|
||||
this._dn1 = Math.sqrt(1 + geod._ep2 * m.sq(sbet1));
|
||||
|
||||
// Evaluate alp0 from sin(alp1) * cos(bet1) = sin(alp0),
|
||||
this._salp0 = this._salp1 * cbet1; // alp0 in [0, pi/2 - |bet1|]
|
||||
// Alt: calp0 = hypot(sbet1, calp1 * cbet1). The following
|
||||
// is slightly better (consider the case salp1 = 0).
|
||||
this._calp0 = m.hypot(this._calp1, this._salp1 * sbet1);
|
||||
// Evaluate sig with tan(bet1) = tan(sig1) * cos(alp1).
|
||||
// sig = 0 is nearest northward crossing of equator.
|
||||
// With bet1 = 0, alp1 = pi/2, we have sig1 = 0 (equatorial line).
|
||||
// With bet1 = pi/2, alp1 = -pi, sig1 = pi/2
|
||||
// With bet1 = -pi/2, alp1 = 0 , sig1 = -pi/2
|
||||
// Evaluate omg1 with tan(omg1) = sin(alp0) * tan(sig1).
|
||||
// With alp0 in (0, pi/2], quadrants for sig and omg coincide.
|
||||
// No atan2(0,0) ambiguity at poles since cbet1 = +epsilon.
|
||||
// With alp0 = 0, omg1 = 0 for alp1 = 0, omg1 = pi for alp1 = pi.
|
||||
this._ssig1 = sbet1; this._somg1 = this._salp0 * sbet1;
|
||||
this._csig1 = this._comg1 =
|
||||
sbet1 != 0 || this._calp1 != 0 ? cbet1 * this._calp1 : 1;
|
||||
// SinCosNorm(this._ssig1, this._csig1); // sig1 in (-pi, pi]
|
||||
var t = m.hypot(this._ssig1, this._csig1);
|
||||
this._ssig1 /= t; this._csig1 /= t;
|
||||
// SinCosNorm(this._somg1, this._comg1); -- don't need to normalize!
|
||||
|
||||
this._k2 = m.sq(this._calp0) * geod._ep2;
|
||||
var eps = this._k2 / (2 * (1 + Math.sqrt(1 + this._k2)) + this._k2);
|
||||
|
||||
if (this._caps & g.CAP_C1) {
|
||||
this._A1m1 = g.A1m1f(eps);
|
||||
this._C1a = new Array(g.nC1_ + 1);
|
||||
g.C1f(eps, this._C1a);
|
||||
this._B11 = g.SinCosSeries(true, this._ssig1, this._csig1,
|
||||
this._C1a, g.nC1_);
|
||||
var s = Math.sin(this._B11), c = Math.cos(this._B11);
|
||||
// tau1 = sig1 + B11
|
||||
this._stau1 = this._ssig1 * c + this._csig1 * s;
|
||||
this._ctau1 = this._csig1 * c - this._ssig1 * s;
|
||||
// Not necessary because C1pa reverts C1a
|
||||
// _B11 = -SinCosSeries(true, _stau1, _ctau1, _C1pa, nC1p_);
|
||||
}
|
||||
|
||||
if (this._caps & g.CAP_C1p) {
|
||||
this._C1pa = new Array(g.nC1p_ + 1),
|
||||
g.C1pf(eps, this._C1pa);
|
||||
}
|
||||
|
||||
if (this._caps & g.CAP_C2) {
|
||||
this._A2m1 = g.A2m1f(eps);
|
||||
this._C2a = new Array(g.nC2_ + 1);
|
||||
g.C2f(eps, this._C2a);
|
||||
this._B21 = g.SinCosSeries(true, this._ssig1, this._csig1,
|
||||
this._C2a, g.nC2_);
|
||||
}
|
||||
|
||||
if (this._caps & g.CAP_C3) {
|
||||
this._C3a = new Array(g.nC3_);
|
||||
geod.C3f(eps, this._C3a);
|
||||
this._A3c = -this._f * this._salp0 * geod.A3f(eps);
|
||||
this._B31 = g.SinCosSeries(true, this._ssig1, this._csig1,
|
||||
this._C3a, g.nC3_-1);
|
||||
}
|
||||
|
||||
if (this._caps & g.CAP_C4) {
|
||||
this._C4a = new Array(g.nC4_); // all the elements of _C4a are used
|
||||
geod.C4f(eps, this._C4a);
|
||||
// Multiplier = a^2 * e^2 * cos(alpha0) * sin(alpha0)
|
||||
this._A4 = m.sq(this._a) * this._calp0 * this._salp0 * geod._e2;
|
||||
this._B41 = g.SinCosSeries(false, this._ssig1, this._csig1,
|
||||
this._C4a, g.nC4_);
|
||||
}
|
||||
}
|
||||
|
||||
// return a12, lat2, lon2, azi2, s12, m12, M12, M21, S12
|
||||
l.GeodesicLine.prototype.GenPosition = function(arcmode, s12_a12,
|
||||
outmask) {
|
||||
var vals = {};
|
||||
outmask &= this._caps & g.OUT_ALL;
|
||||
if (!( arcmode || (this._caps & g.DISTANCE_IN & g.OUT_ALL) )) {
|
||||
// Uninitialized or impossible distance calculation requested
|
||||
vals.a12 = Number.NaN;
|
||||
return vals;
|
||||
}
|
||||
|
||||
// Avoid warning about uninitialized B12.
|
||||
var sig12, ssig12, csig12, B12 = 0, AB1 = 0;
|
||||
if (arcmode) {
|
||||
// Interpret s12_a12 as spherical arc length
|
||||
sig12 = s12_a12 * m.degree;
|
||||
var s12a = Math.abs(s12_a12);
|
||||
s12a -= 180 * Math.floor(s12a / 180);
|
||||
ssig12 = s12a == 0 ? 0 : Math.sin(sig12);
|
||||
csig12 = s12a == 90 ? 0 : Math.cos(sig12);
|
||||
} else {
|
||||
// Interpret s12_a12 as distance
|
||||
var
|
||||
tau12 = s12_a12 / (this._b * (1 + this._A1m1)),
|
||||
s = Math.sin(tau12),
|
||||
c = Math.cos(tau12);
|
||||
// tau2 = tau1 + tau12
|
||||
B12 = - g.SinCosSeries(true,
|
||||
this._stau1 * c + this._ctau1 * s,
|
||||
this._ctau1 * c - this._stau1 * s,
|
||||
this._C1pa, g.nC1p_);
|
||||
sig12 = tau12 - (B12 - this._B11);
|
||||
ssig12 = Math.sin(sig12); csig12 = Math.cos(sig12);
|
||||
if (Math.abs(this._f) > 0.01) {
|
||||
// Reverted distance series is inaccurate for |f| > 1/100, so correct
|
||||
// sig12 with 1 Newton iteration. The following table shows the
|
||||
// approximate maximum error for a = WGS_a() and various f relative to
|
||||
// GeodesicExact.
|
||||
// erri = the error in the inverse solution (nm)
|
||||
// errd = the error in the direct solution (series only) (nm)
|
||||
// errda = the error in the direct solution (series + 1 Newton) (nm)
|
||||
//
|
||||
// f erri errd errda
|
||||
// -1/5 12e6 1.2e9 69e6
|
||||
// -1/10 123e3 12e6 765e3
|
||||
// -1/20 1110 108e3 7155
|
||||
// -1/50 18.63 200.9 27.12
|
||||
// -1/100 18.63 23.78 23.37
|
||||
// -1/150 18.63 21.05 20.26
|
||||
// 1/150 22.35 24.73 25.83
|
||||
// 1/100 22.35 25.03 25.31
|
||||
// 1/50 29.80 231.9 30.44
|
||||
// 1/20 5376 146e3 10e3
|
||||
// 1/10 829e3 22e6 1.5e6
|
||||
// 1/5 157e6 3.8e9 280e6
|
||||
var
|
||||
ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12,
|
||||
csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
|
||||
B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a, g.nC1_);
|
||||
var serr = (1 + this._A1m1) * (sig12 + (B12 - this._B11)) -
|
||||
s12_a12 / this._b;
|
||||
sig12 = sig12 - serr / Math.sqrt(1 + this._k2 * m.sq(ssig2));
|
||||
ssig12 = Math.sin(sig12); csig12 = Math.cos(sig12);
|
||||
// Update B12 below
|
||||
}
|
||||
}
|
||||
|
||||
var omg12, lam12, lon12;
|
||||
var ssig2, csig2, sbet2, cbet2, somg2, comg2, salp2, calp2;
|
||||
// sig2 = sig1 + sig12
|
||||
ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
|
||||
csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
|
||||
var dn2 = Math.sqrt(1 + this._k2 * m.sq(ssig2));
|
||||
if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
||||
if (arcmode || Math.abs(this._f) > 0.01)
|
||||
B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a, g.nC1_);
|
||||
AB1 = (1 + this._A1m1) * (B12 - this._B11);
|
||||
}
|
||||
// sin(bet2) = cos(alp0) * sin(sig2)
|
||||
sbet2 = this._calp0 * ssig2;
|
||||
// Alt: cbet2 = hypot(csig2, salp0 * ssig2);
|
||||
cbet2 = m.hypot(this._salp0, this._calp0 * csig2);
|
||||
if (cbet2 == 0)
|
||||
// I.e., salp0 = 0, csig2 = 0. Break the degeneracy in this case
|
||||
cbet2 = csig2 = g.tiny_;
|
||||
// tan(omg2) = sin(alp0) * tan(sig2)
|
||||
somg2 = this._salp0 * ssig2; comg2 = csig2; // No need to normalize
|
||||
// tan(alp0) = cos(sig2)*tan(alp2)
|
||||
salp2 = this._salp0; calp2 = this._calp0 * csig2; // No need to normalize
|
||||
// omg12 = omg2 - omg1
|
||||
omg12 = Math.atan2(somg2 * this._comg1 - comg2 * this._somg1,
|
||||
comg2 * this._comg1 + somg2 * this._somg1);
|
||||
|
||||
if (outmask & g.DISTANCE)
|
||||
vals.s12 = arcmode ? this._b * ((1 + this._A1m1) * sig12 + AB1) : s12_a12;
|
||||
|
||||
if (outmask & g.LONGITUDE) {
|
||||
lam12 = omg12 + this._A3c *
|
||||
( sig12 + (g.SinCosSeries(true, ssig2, csig2, this._C3a, g.nC3_-1)
|
||||
- this._B31));
|
||||
lon12 = lam12 / m.degree;
|
||||
// Use AngNormalize2 because longitude might have wrapped multiple times.
|
||||
lon12 = m.AngNormalize2(lon12);
|
||||
vals.lon2 = m.AngNormalize(this._lon1 + lon12);
|
||||
}
|
||||
|
||||
if (outmask & g.LATITUDE)
|
||||
vals.lat2 = Math.atan2(sbet2, this._f1 * cbet2) / m.degree;
|
||||
|
||||
if (outmask & g.AZIMUTH)
|
||||
// minus signs give range [-180, 180). 0- converts -0 to +0.
|
||||
vals.azi2 = 0 - Math.atan2(-salp2, calp2) / m.degree;
|
||||
|
||||
if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
||||
var
|
||||
B22 = g.SinCosSeries(true, ssig2, csig2, this._C2a, g.nC2_),
|
||||
AB2 = (1 + this._A2m1) * (B22 - this._B21),
|
||||
J12 = (this._A1m1 - this._A2m1) * sig12 + (AB1 - AB2);
|
||||
if (outmask & g.REDUCEDLENGTH)
|
||||
// Add parens around (_csig1 * ssig2) and (_ssig1 * csig2) to ensure
|
||||
// accurate cancellation in the case of coincident points.
|
||||
vals.m12 = this._b * (( dn2 * (this._csig1 * ssig2) -
|
||||
this._dn1 * (this._ssig1 * csig2))
|
||||
- this._csig1 * csig2 * J12);
|
||||
if (outmask & g.GEODESICSCALE) {
|
||||
var t = this._k2 * (ssig2 - this._ssig1) * (ssig2 + this._ssig1) /
|
||||
(this._dn1 + dn2);
|
||||
vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * this._ssig1 / this._dn1;
|
||||
vals.M21 = csig12 - (t * this._ssig1 - this._csig1 * J12) * ssig2 / dn2;
|
||||
}
|
||||
}
|
||||
|
||||
if (outmask & g.AREA) {
|
||||
var
|
||||
B42 = g.SinCosSeries(false, ssig2, csig2, this._C4a, g.nC4_);
|
||||
var salp12, calp12;
|
||||
if (this._calp0 == 0 || this._salp0 == 0) {
|
||||
// alp12 = alp2 - alp1, used in atan2 so no need to normalized
|
||||
salp12 = salp2 * this._calp1 - calp2 * this._salp1;
|
||||
calp12 = calp2 * this._calp1 + salp2 * this._salp1;
|
||||
// The right thing appears to happen if alp1 = +/-180 and alp2 = 0, viz
|
||||
// salp12 = -0 and alp12 = -180. However this depends on the sign being
|
||||
// attached to 0 correctly. The following ensures the correct behavior.
|
||||
if (salp12 == 0 && calp12 < 0) {
|
||||
salp12 = g.tiny_ * this._calp1;
|
||||
calp12 = -1;
|
||||
}
|
||||
} else {
|
||||
// tan(alp) = tan(alp0) * sec(sig)
|
||||
// tan(alp2-alp1) = (tan(alp2) -tan(alp1)) / (tan(alp2)*tan(alp1)+1)
|
||||
// = calp0 * salp0 * (csig1-csig2) / (salp0^2 + calp0^2 * csig1*csig2)
|
||||
// If csig12 > 0, write
|
||||
// csig1 - csig2 = ssig12 * (csig1 * ssig12 / (1 + csig12) + ssig1)
|
||||
// else
|
||||
// csig1 - csig2 = csig1 * (1 - csig12) + ssig12 * ssig1
|
||||
// No need to normalize
|
||||
salp12 = this._calp0 * this._salp0 *
|
||||
(csig12 <= 0 ? this._csig1 * (1 - csig12) + ssig12 * this._ssig1 :
|
||||
ssig12 * (this._csig1 * ssig12 / (1 + csig12) + this._ssig1));
|
||||
calp12 = m.sq(this._salp0) + m.sq(this._calp0) * this._csig1 * csig2;
|
||||
}
|
||||
vals.S12 = this._c2 * Math.atan2(salp12, calp12) +
|
||||
this._A4 * (B42 - this._B41);
|
||||
}
|
||||
|
||||
vals.a12 = arcmode ? s12_a12 : sig12 / m.degree;
|
||||
return vals;
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
@ -1,257 +0,0 @@
|
|||
/**
|
||||
* Interface.js
|
||||
* JavaScript interface routines for the geodesic routines GeographicLib.
|
||||
*
|
||||
* This provides JavaScript-style interfaces to Math.js, Geodesic.js,
|
||||
* GeodesicLine.js, and PolygonArea.js which, in turn, are rather
|
||||
* literal translations of the following classes from GeographicLib:
|
||||
* Math, Accumulator, Geodesic, GeodesicLine, PolygonArea. See the
|
||||
* documentation for the C++ class for more information at
|
||||
*
|
||||
* http://geographiclib.sourceforge.net/html/annotated.html
|
||||
*
|
||||
* The algorithms are derived in
|
||||
*
|
||||
* Charles F. F. Karney,
|
||||
* Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
|
||||
* http://dx.doi.org/10.1007/s00190-012-0578-z
|
||||
* Addenda: http://geographiclib.sf.net/geod-addenda.html
|
||||
*
|
||||
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed
|
||||
* under the MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
**********************************************************************
|
||||
* GeographicLib.Geodesic.WGS84.Inverse(lat1, lon1, lat2, lon2, outmask);
|
||||
* GeographicLib.Geodesic.WGS84.Direct(lat1, lon1, azi1, s12, outmask);
|
||||
*
|
||||
* perform the basic geodesic calculations. These return an object with
|
||||
* (some) of the following fields:
|
||||
*
|
||||
* lat1 latitude of point 1
|
||||
* lon1 longitude of point 1
|
||||
* azi1 azimuth of line at point 1
|
||||
* lat2 latitude of point 2
|
||||
* lon2 longitude of point 2
|
||||
* azi2 azimuth of line at point 2
|
||||
* s12 distance from 1 to 2
|
||||
* a12 arc length on auxiliary sphere from 1 to 2
|
||||
* m12 reduced length of geodesic
|
||||
* M12 geodesic scale 2 relative to 1
|
||||
* M21 geodesic scale 1 relative to 2
|
||||
* S12 area between geodesic and equator
|
||||
*
|
||||
* outmask determines which fields get included and if outmask is
|
||||
* omitted, then only the basic geodesic fields are computed. The mask
|
||||
* is an or'ed combination of the following values
|
||||
*
|
||||
* GeographicLib.Geodesic.LATITUDE
|
||||
* GeographicLib.Geodesic.LONGITUDE
|
||||
* GeographicLib.Geodesic.AZIMUTH
|
||||
* GeographicLib.Geodesic.DISTANCE
|
||||
* GeographicLib.Geodesic.REDUCEDLENGTH
|
||||
* GeographicLib.Geodesic.GEODESICSCALE
|
||||
* GeographicLib.Geodesic.AREA
|
||||
* GeographicLib.Geodesic.ALL
|
||||
*
|
||||
**********************************************************************
|
||||
* GeographicLib.Geodesic.WGS84.InversePath(lat1, lon1, lat2, lon2, ds12, maxk);
|
||||
* GeographicLib.Geodesic.WGS84.DirectPath(lat1, lon1, azi1, s12, ds12, maxk);
|
||||
*
|
||||
* splits a geodesic line into k equal pieces which are no longer than
|
||||
* about ds12 (but k cannot exceed maxk, default 20), and returns an
|
||||
* array of length k + 1 of objects with fields
|
||||
*
|
||||
* lat, lon, azi
|
||||
*
|
||||
**********************************************************************
|
||||
* GeographicLib.Geodesic.Envelope(lat1, lon1, azi1, s12, k)
|
||||
*
|
||||
* return the geodesic circle of radius s12 centered on the point lat1,
|
||||
* lon1. k equally spaced azimuths starting at azi1 are computed. This
|
||||
* returns an array of k + 1 points with fields lat and lon (with the
|
||||
* first and last points matching).
|
||||
*
|
||||
**********************************************************************
|
||||
* GeographicLib.Geodesic.Envelope(lat1, lon1, k, ord);
|
||||
*
|
||||
* returns the ord'th order envelope for geodesics emanating from lat1,
|
||||
* lon1. This is located approximately circumference * ord/2 from the
|
||||
* point. Thus odd numbered envelopes are centered at the antipodal
|
||||
* point and even number envelopes are centered on the point itself.
|
||||
* This returns an array of k + 1 points with fields lat and lon (with
|
||||
* the first and last points matching).
|
||||
*
|
||||
**********************************************************************
|
||||
* GeographicLib.Geodesic.WGS84.Area(points, polyline);
|
||||
*
|
||||
* computes the area of a polygon with vertices given by an array
|
||||
* points, each of whose elements contains lat and lon fields. The
|
||||
* function returns an object with fields.
|
||||
*
|
||||
* number, perimeter, area
|
||||
*
|
||||
* There is no need to "close" the polygon. If polyline (default =
|
||||
* false) is true, then the points denote a polyline and its length is
|
||||
* returned as the perimeter (and the area is not calculated).
|
||||
**********************************************************************/
|
||||
|
||||
(function() {
|
||||
var m = GeographicLib.Math;
|
||||
var g = GeographicLib.Geodesic;
|
||||
var l = GeographicLib.GeodesicLine;
|
||||
|
||||
g.Geodesic.CheckPosition = function(lat, lon) {
|
||||
if (!(Math.abs(lat) <= 90))
|
||||
throw new Error("latitude " + lat + " not in [-90, 90]");
|
||||
if (!(lon >= -540 && lon < 540))
|
||||
throw new Error("longitude " + lon + " not in [-540, 540)");
|
||||
return m.AngNormalize(lon);
|
||||
}
|
||||
|
||||
g.Geodesic.CheckAzimuth = function(azi) {
|
||||
if (!(azi >= -540 && azi < 540))
|
||||
throw new Error("longitude " + azi + " not in [-540, 540)");
|
||||
return m.AngNormalize(azi);
|
||||
}
|
||||
|
||||
g.Geodesic.CheckDistance = function(s) {
|
||||
if (!(isFinite(s)))
|
||||
throw new Error("distance " + s + " not a finite number");
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.Inverse = function(lat1, lon1, lat2, lon2, outmask) {
|
||||
if (!outmask) outmask = g.DISTANCE | g.AZIMUTH;
|
||||
lon1 = g.Geodesic.CheckPosition(lat1, lon1);
|
||||
lon2 = g.Geodesic.CheckPosition(lat2, lon2);
|
||||
|
||||
var result = this.GenInverse(lat1, lon1, lat2, lon2, outmask);
|
||||
result.lat1 = lat1; result.lon1 = lon1;
|
||||
result.lat2 = lat2; result.lon2 = lon2;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.Direct = function(lat1, lon1, azi1, s12, outmask) {
|
||||
if (!outmask) outmask = g.LATITUDE | g.LONGITUDE | g.AZIMUTH;
|
||||
lon1 = g.Geodesic.CheckPosition(lat1, lon1);
|
||||
azi1 = g.Geodesic.CheckAzimuth(azi1);
|
||||
g.Geodesic.CheckDistance(s12);
|
||||
|
||||
var result = this.GenDirect(lat1, lon1, azi1, false, s12, outmask);
|
||||
result.lat1 = lat1; result.lon1 = lon1;
|
||||
result.azi1 = azi1; result.s12 = s12;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.InversePath =
|
||||
function(lat1, lon1, lat2, lon2, ds12, maxk) {
|
||||
var t = this.Inverse(lat1, lon1, lat2, lon2);
|
||||
if (!maxk) maxk = 20;
|
||||
if (!(ds12 > 0))
|
||||
throw new Error("ds12 must be a positive number")
|
||||
var
|
||||
k = Math.max(1, Math.min(maxk, Math.ceil(t.s12/ds12))),
|
||||
points = new Array(k + 1);
|
||||
points[0] = {lat: t.lat1, lon: t.lon1, azi: t.azi1};
|
||||
points[k] = {lat: t.lat2, lon: t.lon2, azi: t.azi2};
|
||||
if (k > 1) {
|
||||
var line = new l.GeodesicLine(this, t.lat1, t.lon1, t.azi1,
|
||||
g.LATITUDE | g.LONGITUDE | g.AZIMUTH),
|
||||
da12 = t.a12/k;
|
||||
var vals;
|
||||
for (var i = 1; i < k; ++i) {
|
||||
vals =
|
||||
line.GenPosition(true, i * da12, g.LATITUDE | g.LONGITUDE | g.AZIMUTH);
|
||||
points[i] = {lat: vals.lat2, lon: vals.lon2, azi: vals.azi2};
|
||||
}
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.DirectPath =
|
||||
function(lat1, lon1, azi1, s12, ds12, maxk) {
|
||||
var t = this.Direct(lat1, lon1, azi1, s12);
|
||||
if (!maxk) maxk = 20;
|
||||
if (!(ds12 > 0))
|
||||
throw new Error("ds12 must be a positive number")
|
||||
var
|
||||
k = Math.max(1, Math.min(maxk, Math.ceil(Math.abs(t.s12)/ds12))),
|
||||
points = new Array(k + 1);
|
||||
points[0] = {lat: t.lat1, lon: t.lon1, azi: t.azi1};
|
||||
points[k] = {lat: t.lat2, lon: t.lon2, azi: t.azi2};
|
||||
if (k > 1) {
|
||||
var line = new l.GeodesicLine(this, t.lat1, t.lon1, t.azi1,
|
||||
g.LATITUDE | g.LONGITUDE | g.AZIMUTH),
|
||||
da12 = t.a12/k;
|
||||
var vals;
|
||||
for (var i = 1; i < k; ++i) {
|
||||
vals =
|
||||
line.GenPosition(true, i * da12, g.LATITUDE | g.LONGITUDE | g.AZIMUTH);
|
||||
points[i] = {lat: vals.lat2, lon: vals.lon2, azi: vals.azi2};
|
||||
}
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.Circle = function(lat1, lon1, azi1, s12, k) {
|
||||
if (!(Math.abs(lat1) <= 90))
|
||||
throw new Error("lat1 must be in [-90, 90]");
|
||||
if (!(lon1 >= -540 && lon1 < 540))
|
||||
throw new Error("lon1 must be in [-540, 540)");
|
||||
if (!(azi1 >= -540 && azi1 < 540))
|
||||
throw new Error("azi1 must be in [-540, 540)");
|
||||
if (!(isFinite(s12)))
|
||||
throw new Error("s12 must be a finite number");
|
||||
lon1 = m.AngNormalize(lon1);
|
||||
azi1 = m.AngNormalize(azi1);
|
||||
if (!k || k < 4) k = 24;
|
||||
var points = new Array(k + 1);
|
||||
var vals;
|
||||
for (var i = 0; i <= k; ++i) {
|
||||
var azi1a = azi1 + (k - i) * 360 / k; // Traverse circle counter-clocwise
|
||||
if (azi1a >= 180) azi1a -= 360;
|
||||
vals =
|
||||
this.GenDirect(lat1, lon1, azi1a, false, s12, g.LATITUDE | g.LONGITUDE);
|
||||
points[i] = {lat: vals.lat2, lon: vals.lon2};
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.Envelope = function(lat1, lon1, k, ord) {
|
||||
if (!(Math.abs(lat1) <= 90))
|
||||
throw new Error("lat1 must be in [-90, 90]");
|
||||
if (!(lon1 >= -540 && lon1 < 540))
|
||||
throw new Error("lon1 must be in [-540, 540)");
|
||||
lon1 = m.AngNormalize(lon1);
|
||||
if (!k || k < 4) k = 24;
|
||||
if (!ord) ord = 1;
|
||||
var points = new Array(k + 1);
|
||||
var vals, line, s12, j;
|
||||
for (var i = 0; i <= k; ++i) {
|
||||
var azi1 = -180 + i * 360 / k;
|
||||
line = new l.GeodesicLine(this, lat1, lon1, azi1,
|
||||
g.LATITUDE | g.LONGITUDE | g.DISTANCE_IN |
|
||||
g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
|
||||
vals = line.GenPosition(true, 180 * ord,
|
||||
g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
|
||||
j = 0;
|
||||
while (true) {
|
||||
// Solve m12(s12) = 0 by Newton's method using dm12/ds12 = M21
|
||||
s12 = vals.s12 - vals.m12/vals.M21;
|
||||
if (Math.abs(vals.m12) < line._a * g.tol2_ * 0.1 || ++j > 10)
|
||||
break;
|
||||
vals = line.GenPosition(false, s12,
|
||||
g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
|
||||
}
|
||||
vals = line.GenPosition(false, s12, g.LATITUDE | g.LONGITUDE);
|
||||
points[i] = {lat: vals.lat2, lon: vals.lon2};
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
g.Geodesic.prototype.Area = function(points, polyline) {
|
||||
return GeographicLib.PolygonArea.Area(this, points, polyline);
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
/**
|
||||
* Math.js
|
||||
* Transcription of Math.hpp, Constants.hpp, and Accumulator.hpp into
|
||||
* JavaScript.
|
||||
*
|
||||
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed
|
||||
* under the MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
**********************************************************************/
|
||||
|
||||
var GeographicLib; if (!GeographicLib) GeographicLib = {};
|
||||
|
||||
GeographicLib.Math = {};
|
||||
|
||||
GeographicLib.Math.sq = function(x) { return x * x; }
|
||||
|
||||
GeographicLib.Math.hypot = function(x, y) {
|
||||
x = Math.abs(x);
|
||||
y = Math.abs(y);
|
||||
var a = Math.max(x, y), b = Math.min(x, y) / (a ? a : 1);
|
||||
return a * Math.sqrt(1 + b * b);
|
||||
}
|
||||
|
||||
GeographicLib.Math.cbrt = function(x) {
|
||||
var y = Math.pow(Math.abs(x), 1/3);
|
||||
return x < 0 ? -y : y;
|
||||
}
|
||||
|
||||
GeographicLib.Math.log1p = function(x) {
|
||||
var
|
||||
y = 1 + x,
|
||||
z = y - 1;
|
||||
// Here's the explanation for this magic: y = 1 + z, exactly, and z
|
||||
// approx x, thus log(y)/z (which is nearly constant near z = 0) returns
|
||||
// a good approximation to the true log(1 + x)/x. The multiplication x *
|
||||
// (log(y)/z) introduces little additional error.
|
||||
return z == 0 ? x : x * Math.log(y) / z;
|
||||
}
|
||||
|
||||
GeographicLib.Math.atanh = function(x) {
|
||||
var y = Math.abs(x); // Enforce odd parity
|
||||
y = GeographicLib.Math.log1p(2 * y/(1 - y))/2;
|
||||
return x < 0 ? -y : y;
|
||||
}
|
||||
|
||||
GeographicLib.Math.sum = function(u, v) {
|
||||
var
|
||||
s = u + v,
|
||||
up = s - v,
|
||||
vpp = s - up;
|
||||
up -= u;
|
||||
vpp -= v;
|
||||
t = -(up + vpp);
|
||||
// u + v = s + t
|
||||
// = round(u + v) + t
|
||||
return {s: s, t: t};
|
||||
}
|
||||
|
||||
GeographicLib.Math.AngNormalize = function(x) {
|
||||
// Place angle in [-180, 180). Assumes x is in [-540, 540).
|
||||
return x >= 180 ? x - 360 : (x < -180 ? x + 360 : x);
|
||||
}
|
||||
|
||||
GeographicLib.Math.AngNormalize2 = function(x) {
|
||||
// Place arbitrary angle in [-180, 180).
|
||||
return GeographicLib.Math.AngNormalize(x % 360);
|
||||
}
|
||||
|
||||
GeographicLib.Math.AngDiff = function(x, y) {
|
||||
// Compute y - x and reduce to [-180,180] accurately.
|
||||
// This is the same logic as the Accumulator class uses.
|
||||
var
|
||||
d = y - x,
|
||||
yp = d + x,
|
||||
xpp = yp - d;
|
||||
yp -= y;
|
||||
xpp -= x;
|
||||
var t = xpp - yp;
|
||||
// y - x = d + t
|
||||
// = round(y - x) + t
|
||||
if ((d - 180) + t > 0) // y - x > 180
|
||||
d -= 360; // exact
|
||||
else if ((d + 180) + t <= 0) // y - x <= -180
|
||||
d += 360; // exact
|
||||
return d + t;
|
||||
}
|
||||
|
||||
GeographicLib.Math.epsilon = Math.pow(0.5, 52);
|
||||
GeographicLib.Math.degree = Math.PI/180;
|
||||
GeographicLib.Math.digits = 53;
|
||||
|
||||
GeographicLib.Constants = {};
|
||||
GeographicLib.Constants.WGS84 = { a: 6378137, f: 1/298.257223563 };
|
||||
|
||||
GeographicLib.Accumulator = {};
|
||||
(function() {
|
||||
a = GeographicLib.Accumulator;
|
||||
var m = GeographicLib.Math;
|
||||
|
||||
a.Accumulator = function(y) {
|
||||
this.Set(y);
|
||||
}
|
||||
|
||||
a.Accumulator.prototype.Set = function(y) {
|
||||
if (!y) y = 0;
|
||||
if (y.constructor == a.Accumulator) {
|
||||
this._s = y._s;
|
||||
this._t = y._t;
|
||||
} else {
|
||||
this._s = y;
|
||||
this._t = 0;
|
||||
}
|
||||
}
|
||||
|
||||
a.Accumulator.prototype.Add = function(y) {
|
||||
// Here's Shewchuk's solution...
|
||||
// Accumulate starting at least significant end
|
||||
var u = m.sum(y, this._t);
|
||||
var v = m.sum(u.s, this._s);
|
||||
u = u.t;
|
||||
this._s = v.s;
|
||||
this._t = v.t;
|
||||
// Start is _s, _t decreasing and non-adjacent. Sum is now (s + t + u)
|
||||
// exactly with s, t, u non-adjacent and in decreasing order (except
|
||||
// for possible zeros). The following code tries to normalize the
|
||||
// result. Ideally, we want _s = round(s+t+u) and _u = round(s+t+u -
|
||||
// _s). The follow does an approximate job (and maintains the
|
||||
// decreasing non-adjacent property). Here are two "failures" using
|
||||
// 3-bit floats:
|
||||
//
|
||||
// Case 1: _s is not equal to round(s+t+u) -- off by 1 ulp
|
||||
// [12, -1] - 8 -> [4, 0, -1] -> [4, -1] = 3 should be [3, 0] = 3
|
||||
//
|
||||
// Case 2: _s+_t is not as close to s+t+u as it shold be
|
||||
// [64, 5] + 4 -> [64, 8, 1] -> [64, 8] = 72 (off by 1)
|
||||
// should be [80, -7] = 73 (exact)
|
||||
//
|
||||
// "Fixing" these problems is probably not worth the expense. The
|
||||
// representation inevitably leads to small errors in the accumulated
|
||||
// values. The additional errors illustrated here amount to 1 ulp of
|
||||
// the less significant word during each addition to the Accumulator
|
||||
// and an additional possible error of 1 ulp in the reported sum.
|
||||
//
|
||||
// Incidentally, the "ideal" representation described above is not
|
||||
// canonical, because _s = round(_s + _t) may not be true. For
|
||||
// example, with 3-bit floats:
|
||||
//
|
||||
// [128, 16] + 1 -> [160, -16] -- 160 = round(145).
|
||||
// But [160, 0] - 16 -> [128, 16] -- 128 = round(144).
|
||||
//
|
||||
if (this._s == 0) // This implies t == 0,
|
||||
this._s = u; // so result is u
|
||||
else
|
||||
this._t += u; // otherwise just accumulate u to t.
|
||||
}
|
||||
|
||||
a.Accumulator.prototype.Sum = function(y) {
|
||||
if (!y)
|
||||
return this._s;
|
||||
else {
|
||||
var b = new a.Accumulator(this);
|
||||
b.Add(y);
|
||||
return b._s;
|
||||
}
|
||||
}
|
||||
|
||||
a.Accumulator.prototype.Negate = function() {
|
||||
this._s *= -1;
|
||||
this._t *= -1;
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
@ -1,241 +0,0 @@
|
|||
/**
|
||||
* PolygonArea.js
|
||||
* Transcription of PolygonArea.[ch]pp into JavaScript.
|
||||
*
|
||||
* See the documentation for the C++ class. The conversion is a literal
|
||||
* conversion from C++.
|
||||
*
|
||||
* The algorithms are derived in
|
||||
*
|
||||
* Charles F. F. Karney,
|
||||
* Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
|
||||
* http://dx.doi.org/10.1007/s00190-012-0578-z
|
||||
* Addenda: http://geographiclib.sf.net/geod-addenda.html
|
||||
*
|
||||
* Copyright (c) Charles Karney (2011-2013) <charles@karney.com> and licensed
|
||||
* under the MIT/X11 License. For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
**********************************************************************/
|
||||
|
||||
// Load AFTER GeographicLib/Math.js and GeographicLib/Geodesic.js
|
||||
|
||||
GeographicLib.PolygonArea = {};
|
||||
|
||||
(function() {
|
||||
var m = GeographicLib.Math;
|
||||
var a = GeographicLib.Accumulator;
|
||||
var g = GeographicLib.Geodesic;
|
||||
var p = GeographicLib.PolygonArea;
|
||||
|
||||
p.transit = function(lon1, lon2) {
|
||||
// Return 1 or -1 if crossing prime meridian in east or west direction.
|
||||
// Otherwise return zero.
|
||||
// Compute lon12 the same way as Geodesic::Inverse.
|
||||
lon1 = m.AngNormalize(lon1);
|
||||
lon2 = m.AngNormalize(lon2);
|
||||
var lon12 = m.AngDiff(lon1, lon2);
|
||||
var cross =
|
||||
lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
|
||||
(lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
|
||||
return cross;
|
||||
}
|
||||
|
||||
p.PolygonArea = function(earth, polyline) {
|
||||
this._earth = earth;
|
||||
this._area0 = 4 * Math.PI * earth._c2;
|
||||
this._polyline = !polyline ? false : polyline;
|
||||
this._mask = g.LATITUDE | g.LONGITUDE | g.DISTANCE |
|
||||
(this._polyline ? g.NONE : g.AREA);
|
||||
if (!this._polyline)
|
||||
this._areasum = new a.Accumulator(0);
|
||||
this._perimetersum = new a.Accumulator(0);
|
||||
this.Clear();
|
||||
}
|
||||
|
||||
p.PolygonArea.prototype.Clear = function() {
|
||||
this._num = 0;
|
||||
this._crossings = 0;
|
||||
if (!this._polyline)
|
||||
this._areasum.Set(0);
|
||||
this._perimetersum.Set(0);
|
||||
this._lat0 = this._lon0 = this._lat1 = this._lon1 = Number.NaN;
|
||||
}
|
||||
|
||||
p.PolygonArea.prototype.AddPoint = function(lat, lon) {
|
||||
if (this._num == 0) {
|
||||
this._lat0 = this._lat1 = lat;
|
||||
this._lon0 = this._lon1 = lon;
|
||||
} else {
|
||||
var t = this._earth.Inverse(this._lat1, this._lon1, lat, lon, this._mask);
|
||||
this._perimetersum.Add(t.s12);
|
||||
if (!this._polyline) {
|
||||
this._areasum.Add(t.S12);
|
||||
this._crossings += p.transit(this._lon1, lon);
|
||||
}
|
||||
this._lat1 = lat;
|
||||
this._lon1 = lon;
|
||||
}
|
||||
++this._num;
|
||||
}
|
||||
|
||||
p.PolygonArea.prototype.AddEdge = function(azi, s) {
|
||||
if (this._num) {
|
||||
var t = this._earth.Direct(this._lat1, this._lon1, azi, s, this._mask);
|
||||
this._perimetersum.Add(s);
|
||||
if (!this._polyline) {
|
||||
this._areasum.Add(t.S12);
|
||||
this._crossings += p.transit(this._lon1, t.lon2);
|
||||
}
|
||||
this._lat1 = t.lat2;
|
||||
this._lon1 = t.lon2;
|
||||
}
|
||||
++this._num;
|
||||
}
|
||||
|
||||
// return number, perimeter, area
|
||||
p.PolygonArea.prototype.Compute = function(reverse, sign) {
|
||||
var vals = {number: this._num};
|
||||
if (this._num < 2) {
|
||||
vals.perimeter = 0;
|
||||
if (!this._polyline)
|
||||
vals.area = 0;
|
||||
return vals;
|
||||
}
|
||||
if (this._polyline) {
|
||||
vals.perimeter = this._perimetersum.Sum();
|
||||
return vals;
|
||||
}
|
||||
var t = this._earth.Inverse(this._lat1, this._lon1, this._lat0, this._lon0,
|
||||
this._mask);
|
||||
vals.perimeter = this._perimetersum.Sum(t.s12);
|
||||
var tempsum = new a.Accumulator(this._areasum);
|
||||
tempsum.Add(t.S12);
|
||||
var crossings = this._crossings + p.transit(this._lon1, this._lon0);
|
||||
if (crossings & 1)
|
||||
tempsum.Add( (tempsum.Sum() < 0 ? 1 : -1) * this._area0/2 );
|
||||
// area is with the clockwise sense. If !reverse convert to
|
||||
// counter-clockwise convention.
|
||||
if (!reverse)
|
||||
tempsum.Negate();
|
||||
// If sign put area in (-area0/2, area0/2], else put area in [0, area0)
|
||||
if (sign) {
|
||||
if (tempsum.Sum() > this._area0/2)
|
||||
tempsum.Add( -this._area0 );
|
||||
else if (tempsum.Sum() <= -this._area0/2)
|
||||
tempsum.Add( +this._area0 );
|
||||
} else {
|
||||
if (tempsum.Sum() >= this._area0)
|
||||
tempsum.Add( -this._area0 );
|
||||
else if (tempsum < 0)
|
||||
tempsum.Add( -this._area0 );
|
||||
}
|
||||
vals.area = tempsum.Sum();
|
||||
return vals;
|
||||
}
|
||||
|
||||
// return number, perimeter, area
|
||||
p.PolygonArea.prototype.TestPoint = function(lat, lon, reverse, sign) {
|
||||
var vals = {number: this._num + 1};
|
||||
if (this._num == 0) {
|
||||
vals.perimeter = 0;
|
||||
if (!this._polyline)
|
||||
vals.area = 0;
|
||||
return vals;
|
||||
}
|
||||
vals.perimeter = this._perimetersum.Sum();
|
||||
var tempsum = this._polyline ? 0 : this._areasum.Sum();
|
||||
var crossings = this._crossings;
|
||||
var t;
|
||||
for (var i = 0; i < (this._polyline ? 1 : 2); ++i) {
|
||||
t = this._earth.Inverse
|
||||
(i == 0 ? this._lat1 : lat, i == 0 ? this._lon1 : lon,
|
||||
i != 0 ? this._lat0 : lat, i != 0 ? this._lon0 : lon,
|
||||
this._mask);
|
||||
vals.perimeter += t.s12;
|
||||
if (!this._polyline) {
|
||||
tempsum += t.S12;
|
||||
crossings += p.transit(i == 0 ? this._lon1 : lon,
|
||||
i != 0 ? this._lon0 : lon);
|
||||
}
|
||||
}
|
||||
|
||||
if (this._polyline)
|
||||
return vals;
|
||||
|
||||
if (crossings & 1)
|
||||
tempsum += (tempsum < 0 ? 1 : -1) * this._area0/2;
|
||||
// area is with the clockwise sense. If !reverse convert to
|
||||
// counter-clockwise convention.
|
||||
if (!reverse)
|
||||
tempsum *= -1;
|
||||
// If sign put area in (-area0/2, area0/2], else put area in [0, area0)
|
||||
if (sign) {
|
||||
if (tempsum > this._area0/2)
|
||||
tempsum -= this._area0;
|
||||
else if (tempsum <= -this._area0/2)
|
||||
tempsum += this._area0;
|
||||
} else {
|
||||
if (tempsum >= this._area0)
|
||||
tempsum -= this._area0;
|
||||
else if (tempsum < 0)
|
||||
tempsum += this._area0;
|
||||
}
|
||||
vals.area = tempsum;
|
||||
return vals;
|
||||
}
|
||||
|
||||
// return number, perimeter, area
|
||||
p.PolygonArea.prototype.TestEdge = function(azi, s, reverse, sign) {
|
||||
var vals = {number: this._num ? this._num + 1 : 0};
|
||||
if (this._num == 0)
|
||||
return vals;
|
||||
vals.perimeter = this._perimetersum.Sum() + s;
|
||||
if (this._polyline)
|
||||
return vals;
|
||||
|
||||
var tempsum = this._areasum.Sum();
|
||||
var crossings = this._crossings;
|
||||
var t;
|
||||
t = this._earth.Direct(this._lat1, this._lon1, azi, s, this._mask);
|
||||
tempsum += t.S12;
|
||||
crossings += p.transit(this._lon1, t.lon2);
|
||||
t = this._earth(t.lat2, t.lon2, this._lat0, this._lon0, this._mask);
|
||||
perimeter += t.s12;
|
||||
tempsum += t.S12;
|
||||
crossings += p.transit(t.lon2, this._lon0);
|
||||
|
||||
if (crossings & 1)
|
||||
tempsum += (tempsum < 0 ? 1 : -1) * this._area0/2;
|
||||
// area is with the clockwise sense. If !reverse convert to
|
||||
// counter-clockwise convention.
|
||||
if (!reverse)
|
||||
tempsum *= -1;
|
||||
// If sign put area in (-area0/2, area0/2], else put area in [0, area0)
|
||||
if (sign) {
|
||||
if (tempsum > this._area0/2)
|
||||
tempsum -= this._area0;
|
||||
else if (tempsum <= -this._area0/2)
|
||||
tempsum += this._area0;
|
||||
} else {
|
||||
if (tempsum >= this._area0)
|
||||
tempsum -= this._area0;
|
||||
else if (tempsum < 0)
|
||||
tempsum += this._area0;
|
||||
}
|
||||
vals.area = tempsum;
|
||||
return vals;
|
||||
}
|
||||
|
||||
p.PolygonArea.prototype.CurrentPoint = function() {
|
||||
var vals = {lat: this._lat1, lon: this._lon1};
|
||||
return vals;
|
||||
}
|
||||
|
||||
p.Area = function(earth, points, polyline) {
|
||||
var poly = new p.PolygonArea(earth, polyline);
|
||||
for (var i = 0; i < points.length; ++i)
|
||||
poly.AddPoint(points[i].lat, points[i].lon);
|
||||
return poly.Compute(false, true);
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
@ -1,471 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Geodesic calculations for an ellipsoid done right</title>
|
||||
<meta name="description"
|
||||
content="Geodesic calculations for an ellipsoid done right" />
|
||||
<meta name="author" content="Charles F. F. Karney">
|
||||
<meta name="keywords"
|
||||
content="geodesics,
|
||||
geodesic distance,
|
||||
geographic distance,
|
||||
shortest path,
|
||||
direct geodesic problem,
|
||||
inverse geodesic problem,
|
||||
distance and azimuth,
|
||||
distance and heading,
|
||||
range and bearing,
|
||||
geographic area,
|
||||
geodesic polygon,
|
||||
spheroidal triangle,
|
||||
latitude and longitude,
|
||||
online calculator,
|
||||
WGS84 ellipsoid,
|
||||
GeographicLib" />
|
||||
<script type="text/javascript"
|
||||
src="http://geographiclib.sf.net/scripts/geographiclib.js">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var geod = GeographicLib.Geodesic.WGS84;
|
||||
var dms = GeographicLib.DMS;
|
||||
function formatpoint(lat, lon, azi, dmsformat, prec) {
|
||||
prec += 5;
|
||||
if (dmsformat) {
|
||||
var trail = prec < 2 ? dms.DEGREE :
|
||||
(prec < 4 ? dms.MINUTE : dms.SECOND);
|
||||
prec = prec < 2 ? prec : (prec < 4 ? prec - 2 : prec - 4);
|
||||
return (dms.Encode(lat, trail, prec, dms.LATITUDE) + " " +
|
||||
dms.Encode(lon, trail, prec, dms.LONGITUDE) + " " +
|
||||
dms.Encode(azi, trail, prec, dms.AZIMUTH));
|
||||
} else {
|
||||
return (lat.toFixed(prec) + " " +
|
||||
lon.toFixed(prec) + " " +
|
||||
azi .toFixed(prec));
|
||||
}
|
||||
}
|
||||
|
||||
function GeodesicInverse(input, dmsformat, prec) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a blank-delimited line: lat1 lon1 lat2 lon2
|
||||
var t = new String(input);
|
||||
t = t.replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,6);
|
||||
if (t.length != 4)
|
||||
throw new Error("Need 4 input items");
|
||||
var p1 = GeographicLib.DMS.DecodeLatLon(t[0], t[1]);
|
||||
var p2 = GeographicLib.DMS.DecodeLatLon(t[2], t[3]);
|
||||
t = geod.Inverse(p1.lat, p1.lon, p2.lat, p2.lon);
|
||||
result.status = "OK";
|
||||
result.p1 = formatpoint(t.lat1, t.lon1, t.azi1, dmsformat, prec);
|
||||
result.p2 = formatpoint(t.lat2, t.lon2, t.azi2, dmsformat, prec);
|
||||
result.s12 = t.s12.toFixed(prec);
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.p1 = "";
|
||||
result.p2 = "";
|
||||
result.s12 = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function GeodesicDirect(input, dmsformat, prec) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a blank-delimited line: lat1 lon1 azi1 s12
|
||||
var t = new String(input);
|
||||
t = t.replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,6);
|
||||
if (t.length != 4)
|
||||
throw new Error("Need 4 input items");
|
||||
var p1 = GeographicLib.DMS.DecodeLatLon(t[0], t[1]);
|
||||
var azi1 = GeographicLib.DMS.DecodeAzimuth(t[2]);
|
||||
var s12 = parseFloat(t[3]);
|
||||
t = geod.Direct(p1.lat, p1.lon, azi1, s12);
|
||||
result.status = "OK";
|
||||
result.p1 = formatpoint(t.lat1, t.lon1, t.azi1, dmsformat, prec);
|
||||
result.p2 = formatpoint(t.lat2, t.lon2, t.azi2, dmsformat, prec);
|
||||
result.s12 = t.s12.toFixed(prec);
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.p1 = "";
|
||||
result.p2 = "";
|
||||
result.s12 = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function GeodesicInversePath(input, dmsformat, prec) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a blank-delimited line: lat1 lon1 lat2 lon2 ds12 maxnum
|
||||
var t = new String(input);
|
||||
t = t.replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,8);
|
||||
if (t.length != 6)
|
||||
throw new Error("Need 6 input items");
|
||||
var p1 = GeographicLib.DMS.DecodeLatLon(t[0], t[1]);
|
||||
var p2 = GeographicLib.DMS.DecodeLatLon(t[2], t[3]);
|
||||
var ds12 = parseFloat(t[4]);
|
||||
var maxnum = parseInt(t[5]);
|
||||
var t = new String(input);
|
||||
t = t.split(/[\s,]+/,8);
|
||||
if (t[0] == "") t.shift();
|
||||
t = geod.InversePath(p1.lat, p1.lon, p2.lat, p2.lon, ds12, maxnum);
|
||||
result.status = "OK";
|
||||
result.points = ""
|
||||
for (var i = 0; i < t.length; ++i)
|
||||
result.points +=
|
||||
formatpoint(t[i].lat, t[i].lon, t[i].azi, dmsformat, prec) + "\n";
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.points = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function GeodesicArea(input, polyline) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a newline-delimited points;
|
||||
// each point is blank-delimited: lat lon
|
||||
var t = new String(input);
|
||||
t = t.split(/[\r\n]/);
|
||||
if (t[0] == "") t.shift();
|
||||
if (t[t.length-1] == "") t.pop();
|
||||
for (var i = 0; i < t.length; ++i) {
|
||||
var pos = t[i].replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,4);
|
||||
if (pos.length != 2)
|
||||
throw new Error("Need 2 items on each line");
|
||||
t[i] = dms.DecodeLatLon(pos[0], pos[1]);
|
||||
}
|
||||
t = geod.Area(t, polyline);
|
||||
result.status = "OK";
|
||||
result.area = t.number + " " +
|
||||
t.perimeter.toFixed(8);
|
||||
if (!polyline)
|
||||
result.area += " " + t.area.toFixed(2);
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.area = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h2>Geodesic calculations for an ellipsoid done right</h2>
|
||||
</div>
|
||||
<p>
|
||||
This page illustrates the geodesic routines available in
|
||||
<a href="http://geographiclib.sourceforge.net">GeographicLib</a>.
|
||||
The C++ code has been converted to JavaScript so the calculations
|
||||
are carried out on the client. The algorithms are considerably
|
||||
more accurate than Vincenty's method, and offer more functionality
|
||||
(an inverse method which never fails to converge, differential
|
||||
properties of the geodesic, and the area under a geodesic). The
|
||||
algorithms are derived in
|
||||
<blockquote>
|
||||
Charles F. F. Karney,<br>
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
<i>Algorithms for geodesics</i></a>,<br>
|
||||
J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
|
||||
DOI:
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
10.1007/s00190-012-0578-z</a>
|
||||
(<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
|
||||
addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
geod-addenda.html</a>.
|
||||
</blockquote>
|
||||
This page just provides a basic interface. Enter latitudes,
|
||||
longitudes, and azimuths as degrees and distances as meters using
|
||||
spaces or commas as separators. (Angles may be entered as decimal
|
||||
degrees or as degrees, minutes, and seconds, e.g. -20.51125,
|
||||
20°30′40.5″S, S20d30'40.5", or
|
||||
-20:30:40.5.) The results are accurate to about
|
||||
15 nanometers (or 0.1 m<sup>2</sup> per vertex for
|
||||
areas). A slicker page where the geodesics are incorporated into
|
||||
Google Maps is given <a href="geod-google.html">here</a>.
|
||||
<p>
|
||||
Jump to:
|
||||
<ul>
|
||||
<li><a href="#inverse">Inverse problem</a></li>
|
||||
<li><a href="#direct">Direct problem</a></li>
|
||||
<li><a href="#path">Geodesic path</a></li>
|
||||
<li><a href="#area">Polygon area</a></li>
|
||||
<li><a href="geod-google.html">Geodesic lines, circles, and
|
||||
envelopes in Google Maps</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
<hr>
|
||||
<form name="inverse" >
|
||||
<h3><a class="anchor" id="inverse">Inverse problem</h3>
|
||||
<p>
|
||||
Find the shortest path between two points on the earth. The
|
||||
path is characterized by its length <i>s12</i> and its azimuth
|
||||
at the two ends <i>azi1</i> and <i>azi2</i>. The sample
|
||||
calculation finds the shortest path between Wellington, New
|
||||
Zealand, and Salamanca, Spain. (For this example, the
|
||||
<a href="http://www.ngs.noaa.gov/">NGS</a>
|
||||
<a href="http://www.ngs.noaa.gov/cgi-bin/Inv_Fwd/inverse2.prl">
|
||||
inverse geodesic calculator</a> returns a result which is 1.2 km
|
||||
too long with an azimuth which is off by 3 degrees.) To perform
|
||||
the calculation, press the “COMPUTE” button.
|
||||
</p>
|
||||
<p>Enter <i>“lat1 lon1 lat2 lon2”</i>:</p>
|
||||
<p>input:
|
||||
<input name="input" size=72 value="-41.32 174.81 40.96 -5.50" />
|
||||
</p>
|
||||
<p>
|
||||
Output format: <label for="ig">
|
||||
<input type="radio" value="g" name="format" id="ig" checked>
|
||||
decimal degrees
|
||||
</label>
|
||||
<label for="id">
|
||||
<input type="radio" value="d" name="format" id="id">
|
||||
degrees minutes seconds
|
||||
</label><br>
|
||||
Output precision: <select name="prec" size=1>
|
||||
<option value='0'> 1m 0.00001d 0.1"</option>
|
||||
<option value='1'> 100mm 0.01"</option>
|
||||
<option value='2'> 10mm 0.001"</option>
|
||||
<option value='3' selected> 1mm 0.0001"</option>
|
||||
<option value='4'> 100um 0.00001"</option>
|
||||
<option value='5'> 10um 0.000001"</option>
|
||||
<option value='6'> 1um 0.0000001"</option>
|
||||
<option value='7'> 100nm 0.00000001"</option>
|
||||
<option value='8'> 10nm 0.000000001"</option>
|
||||
<option value='9'> 1nm 0.0000000001"</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="button" value="COMPUTE"
|
||||
onclick="var t = GeodesicInverse(document.inverse.input.value,
|
||||
document.inverse.format[1].checked,
|
||||
document.inverse.prec.selectedIndex);
|
||||
document.inverse.status.value = t.status;
|
||||
document.inverse.p1.value = t.p1;
|
||||
document.inverse.p2.value = t.p2;
|
||||
document.inverse.s12.value = t.s12;" />
|
||||
</p>
|
||||
<p>
|
||||
status:
|
||||
<input name="status" size=50 readonly />
|
||||
</p>
|
||||
<p>
|
||||
lat1 lon1 <font color='blue'>azi1</font>:
|
||||
<input name="p1" size=75 readonly />
|
||||
</p>
|
||||
<p>
|
||||
lat2 lon2 <font color='blue'>azi2</font>:
|
||||
<input name="p2" size=75 readonly />
|
||||
</p>
|
||||
<p>
|
||||
<font color='blue'>s12</font>:
|
||||
<input name="s12" size=25 readonly />
|
||||
</p>
|
||||
</form>
|
||||
<hr>
|
||||
<form name="direct">
|
||||
<h3><a class="anchor" id="direct">Direct problem</h3>
|
||||
<p>
|
||||
Find the destination traveling a given distance along a geodesic
|
||||
with a given azimuth at the starting point. The destination is
|
||||
characterized by its position <i>lat2, lon2</i> and its azimuth
|
||||
at the destination <i>azi2</i>. The sample calculation shows
|
||||
the result of travelling 10000 km NE from JFK airport. To perform
|
||||
the calculation, press the “COMPUTE” button.
|
||||
</p>
|
||||
<p>Enter <i>“lat1 lon1 azi1 s12”</i>:</p>
|
||||
<p>input:
|
||||
<input name="input" size=72 value="40.6 -73.8 45 10000e3" />
|
||||
</p>
|
||||
<p>
|
||||
Output format: <label for="dg">
|
||||
<input type="radio" value="g" name="format" id="dg" checked>
|
||||
decimal degrees
|
||||
</label>
|
||||
<label for="dd">
|
||||
<input type="radio" value="d" name="format" id="dd">
|
||||
degrees minutes seconds
|
||||
</label><br>
|
||||
Output precision: <select name="prec" size=1>
|
||||
<option value='0'> 1m 0.00001d 0.1"</option>
|
||||
<option value='1'> 100mm 0.01"</option>
|
||||
<option value='2'> 10mm 0.001"</option>
|
||||
<option value='3' selected> 1mm 0.0001"</option>
|
||||
<option value='4'> 100um 0.00001"</option>
|
||||
<option value='5'> 10um 0.000001"</option>
|
||||
<option value='6'> 1um 0.0000001"</option>
|
||||
<option value='7'> 100nm 0.00000001"</option>
|
||||
<option value='8'> 10nm 0.000000001"</option>
|
||||
<option value='9'> 1nm 0.0000000001"</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="button" value="COMPUTE"
|
||||
onclick="var t = GeodesicDirect(document.direct.input.value,
|
||||
document.direct.format[1].checked,
|
||||
document.direct.prec.selectedIndex);
|
||||
document.direct.status.value = t.status;
|
||||
document.direct.p1.value = t.p1;
|
||||
document.direct.p2.value = t.p2;
|
||||
document.direct.s12.value = t.s12;" />
|
||||
</p>
|
||||
<p>
|
||||
status:
|
||||
<input name="status" size=50 readonly />
|
||||
</p>
|
||||
<p>
|
||||
lat1 lon1 azi1:
|
||||
<input name="p1" size=75 readonly />
|
||||
</p>
|
||||
<p>
|
||||
<font color='blue'>lat2 lon2 azi2</font>:
|
||||
<input name="p2" size=75 readonly />
|
||||
</p>
|
||||
<p>
|
||||
s12:
|
||||
<input name="s12" size=25 readonly />
|
||||
</p>
|
||||
</form>
|
||||
<hr>
|
||||
<form name="path">
|
||||
<h3><a class="anchor" id="path">Geodesic path</h3>
|
||||
<p>
|
||||
Find intermediate points along a geodesic. In addition to
|
||||
specifying the endpoints, give <i>ds12</i>, the maximum distance
|
||||
between the intermediate points and <i>maxk</i>, the maximum
|
||||
number of intervals the geodesic is broken into. The output
|
||||
gives a sequence of positions <i>lat, lon</i> together with the
|
||||
corresponding azimuths <i>azi</i>. The sample shows the path
|
||||
from JFK to Singapore's Changi Airport at about 1000 km
|
||||
intervals. (In this example, the path taken by Google Earth
|
||||
deviates from the shortest path by about 2.9 km.) To perform
|
||||
the calculation, press the “COMPUTE” button.
|
||||
</p>
|
||||
<p>Enter <i>“lat1 lon1 lat2 lon2 ds12 maxk”</i>:</p>
|
||||
<p>input:
|
||||
<input name="input" size=72 value="40.6 -73.8 1.4 104 1000e3 20" />
|
||||
</p>
|
||||
<p>
|
||||
Output format: <label for="pg">
|
||||
<input type="radio" value="g" name="format" id="pg" checked>
|
||||
decimal degrees
|
||||
</label>
|
||||
<label for="pd">
|
||||
<input type="radio" value="d" name="format" id="pd">
|
||||
degrees minutes seconds
|
||||
</label><br>
|
||||
Output precision: <select name="prec" size=1>
|
||||
<option value='0' selected> 1m 0.00001d 0.1"</option>
|
||||
<option value='1'> 100mm 0.01"</option>
|
||||
<option value='2'> 10mm 0.001"</option>
|
||||
<option value='3'> 1mm 0.0001"</option>
|
||||
<option value='4'> 100um 0.00001"</option>
|
||||
<option value='5'> 10um 0.000001"</option>
|
||||
<option value='6'> 1um 0.0000001"</option>
|
||||
<option value='7'> 100nm 0.00000001"</option>
|
||||
<option value='8'> 10nm 0.000000001"</option>
|
||||
<option value='9'> 1nm 0.0000000001"</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="button" value="COMPUTE"
|
||||
onclick="var t = GeodesicInversePath(document.path.input.value,
|
||||
document.path.format[1].checked,
|
||||
document.path.prec.selectedIndex);
|
||||
document.path.status.value = t.status;
|
||||
document.path.points.value = t.points;" />
|
||||
</p>
|
||||
<p>
|
||||
status:
|
||||
<input name="status" size=50 readonly />
|
||||
</p>
|
||||
<p>
|
||||
points (lat lon azi):<br>
|
||||
<textarea name="points" cols=70 rows=21 readonly></textarea>
|
||||
</p>
|
||||
</form>
|
||||
<hr>
|
||||
<form name="area">
|
||||
<h3><a class="anchor" id="area">Polygon area</h3>
|
||||
<p>
|
||||
Find the perimeter and area of a polygon whose sides are
|
||||
geodesics. The polygon must be simple (i.e., must not intersect
|
||||
itself). (There's no need to ensure that the polygon is
|
||||
closed.) Counter-clockwise traversal of the polygon results in
|
||||
a positive area. The polygon can encircle one or both poles.
|
||||
The sample gives the approximate perimeter (in m) and area (in
|
||||
m<sup>2</sup>) of Antarctica. (For this example, Google Earth
|
||||
Pro returns an area which is 30 times too large! However this
|
||||
is a little unfair, since Google Earth has no concept of
|
||||
polygons which encircle a pole.) If the <i>polyline</i> option
|
||||
is selected then just the length of the line joining the points
|
||||
is is returned. To perform the calculation, press the
|
||||
“COMPUTE” button.
|
||||
</p>
|
||||
<p>Enter points, one per line, as <i>“lat lon”</i>:</p>
|
||||
<p>points (lat lon):<br>
|
||||
<textarea name="input" cols=36 rows=13>-63.1 -58
|
||||
-72.9 -74
|
||||
-71.9 -102
|
||||
-74.9 -102
|
||||
-74.3 -131
|
||||
-77.5 -163
|
||||
-77.4 163
|
||||
-71.7 172
|
||||
-65.9 140
|
||||
-65.7 113
|
||||
-66.6 88
|
||||
-66.9 59
|
||||
-69.8 25
|
||||
-70.0 -4
|
||||
-71.0 -14
|
||||
-77.3 -33
|
||||
-77.9 -46
|
||||
-74.7 -61
|
||||
</textarea>
|
||||
</p>
|
||||
<p>
|
||||
Treat points as: <label for="lg">
|
||||
<input type="radio" value="p" name="polyline" id="lg" checked>
|
||||
polygon
|
||||
</label>
|
||||
<label for="ll">
|
||||
<input type="radio" value="l" name="polyline" id="ll">
|
||||
polyline
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="button" value="COMPUTE"
|
||||
onclick="var t = GeodesicArea(document.area.input.value,
|
||||
document.area.polyline[1].checked);
|
||||
document.area.status.value = t.status;
|
||||
document.area.area.value = t.area;" />
|
||||
</p>
|
||||
<p>
|
||||
status:
|
||||
<input name="status" size=50 readonly />
|
||||
</p>
|
||||
<p>
|
||||
number perimeter area:
|
||||
<input name="area" size=55 readonly />
|
||||
</p>
|
||||
</form>
|
||||
<hr>
|
||||
<address>Charles Karney
|
||||
<a href="mailto:charles@karney.com"><charles@karney.com></a>
|
||||
(2011-08-04)</address>
|
||||
<br>
|
||||
<a href="http://geographiclib.sourceforge.net">
|
||||
<img
|
||||
src="http://sourceforge.net/sflogo.php?group_id=283628&type=9"
|
||||
border="0" height="15" width="80" alt="SourceForge.net" />
|
||||
</a>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Geodesic lines, circles, envelopes in Google Maps (instructions)
|
||||
</title>
|
||||
<meta name="description"
|
||||
content="Geodesic lines, circles,
|
||||
envelopes in Google Maps (instructions)" />
|
||||
<meta name="author" content="Charles F. F. Karney">
|
||||
<meta name="keywords"
|
||||
content="geodesics,
|
||||
geodesic distance,
|
||||
geographic distance,
|
||||
shortest path,
|
||||
direct geodesic problem,
|
||||
inverse geodesic problem,
|
||||
distance and azimuth,
|
||||
distance and heading,
|
||||
range and bearing,
|
||||
geographic circle,
|
||||
geodesic envelope,
|
||||
geodesic astroid,
|
||||
latitude and longitude,
|
||||
Google Maps,
|
||||
WGS84 ellipsoid,
|
||||
GeographicLib" />
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Geodesic lines, circles, envelopes in Google Maps (instructions)
|
||||
</h2>
|
||||
<p>
|
||||
The <a href="geod-google.html">page</a> allows you to draw
|
||||
accurate ellipsoidal geodesics on Google Maps. You can specify the
|
||||
geodesic in one of two forms:
|
||||
<ul>
|
||||
<li>
|
||||
The <b>direct</b> problem: specify a starting point, an
|
||||
azimuth and a distance as <i>lat1 lon1 azi1 s12</i> as degrees
|
||||
and meters.
|
||||
<li>
|
||||
The <b>inverse</b> problem: specify the two end points
|
||||
as <i>lat1 lon1 lat2 lon2</i> as degrees; this finds the
|
||||
shortest path between the two points.
|
||||
</ul>
|
||||
(Angles may be entered as decimal degrees or as degrees, minutes,
|
||||
and seconds, e.g. -20.51125, 20°30′40.5″S,
|
||||
S20d30'40.5", or -20:30:40.5.) Click on the
|
||||
corresponding "compute" button. The display then shows
|
||||
<ul>
|
||||
<li>The requested geodesic as a <font color="blue">blue
|
||||
line</font>; the WGS84 ellipsoid model is used.
|
||||
<li>The geodesic circle as a <font color="green">green
|
||||
curve</font>; this shows the locus of points a
|
||||
distance <i>s12</i> from <i>lat1, lon1</i>.
|
||||
<li>The geodesic envelopes as <font color="red">red
|
||||
curves</font>; all the geodesics emanating from <i>lat1,
|
||||
lon1</i> are tangent to the envelopes (providing they are
|
||||
extended far enough). The number of solutions to the inverse
|
||||
problem changes depending on whether <i>lat2, lon2</i> lies
|
||||
inside the envelopes. For example, there are four (resp. two)
|
||||
approximately hemispheroidal geodesics if this point lies
|
||||
inside (resp. outside) the inner envelope (only one of which
|
||||
is a shortest path).
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
The sample data has <i>lat1, lon1</i> in Wellington, New
|
||||
Zealand, <i>lat2, lon2</i> in Salamanca, Spain, and <i>s12</i>
|
||||
about 1.5 times the earth's circumference. Try clicking on the
|
||||
"compute" button next to the "Direct:" input box when the page
|
||||
first loads. You can navigate around the map using the normal
|
||||
Google Map controls.
|
||||
</p>
|
||||
<p>
|
||||
The precision of output for the geodesic is 0.1" or 1 m.
|
||||
A text-only <a href="geod-calc.html">geodesic calculator</a> based
|
||||
on the same JavaScript library is also available; this calculator
|
||||
solves the inverse and direct geodesic problems, computes
|
||||
intermediate points on a geodesic, and finds the area of a
|
||||
geodesic polygon; it allows you to specify the precision of the
|
||||
output and choose between decimal degrees and degress, minutes,
|
||||
and seconds.
|
||||
<p>
|
||||
The Javascipt code for computing the geodesic lines, circles, and
|
||||
envelopes is part of
|
||||
<a href="http://geographiclib.sourceforge.net/">GeographicLib</a>.
|
||||
The algorithms are derived in
|
||||
<blockquote>
|
||||
Charles F. F. Karney,<br>
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
<i>Algorithms for geodesics</i></a>,<br>
|
||||
J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
|
||||
DOI:
|
||||
<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
10.1007/s00190-012-0578-z</a>
|
||||
(<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);<br>
|
||||
addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
geod-addenda.html</a>.
|
||||
</blockquote>
|
||||
In putting together this Google Maps demonstration, I started with
|
||||
the sample code
|
||||
<a href="https://developers.google.com/maps/documentation/javascript/examples/geometry-headings">
|
||||
geometry-headings</a>.
|
||||
</p>
|
||||
<hr>
|
||||
<address>Charles Karney
|
||||
<a href="mailto:charles@karney.com"><charles@karney.com></a>
|
||||
(2011-08-02)</address>
|
||||
<br>
|
||||
<a href="http://geographiclib.sourceforge.net">
|
||||
<img
|
||||
src="http://sourceforge.net/sflogo.php?group_id=283628&type=9"
|
||||
border="0" height="15" width="80" alt="SourceForge.net" />
|
||||
</a>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,226 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<title>Geodesic lines, circles, envelopes in Google Maps</title>
|
||||
<meta name="description"
|
||||
content="Geodesic lines, circles, envelopes in Google Maps" />
|
||||
<meta name="author" content="Charles F. F. Karney">
|
||||
<meta name="keywords"
|
||||
content="geodesics,
|
||||
geodesic distance,
|
||||
geographic distance,
|
||||
shortest path,
|
||||
direct geodesic problem,
|
||||
inverse geodesic problem,
|
||||
distance and azimuth,
|
||||
distance and heading,
|
||||
range and bearing,
|
||||
geographic circle,
|
||||
geodesic envelope,
|
||||
geodesic astroid,
|
||||
latitude and longitude,
|
||||
Google Maps,
|
||||
WGS84 ellipsoid,
|
||||
GeographicLib" />
|
||||
<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="https://maps.googleapis.com/maps/api/js?sensor=false">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var geod = GeographicLib.Geodesic.WGS84;
|
||||
var dms = GeographicLib.DMS;
|
||||
var geodesic, circle, envelope;
|
||||
|
||||
function initialize() {
|
||||
var mapOptions = {
|
||||
zoom: 8,
|
||||
center: new google.maps.LatLng(41.3, -5.5),
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
|
||||
|
||||
var geodesicOptions = {
|
||||
strokeColor: '#0000FF',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 3,
|
||||
geodesic: true
|
||||
}
|
||||
geodesic = new google.maps.Polyline(geodesicOptions);
|
||||
geodesic.setMap(map);
|
||||
|
||||
var circleOptions = {
|
||||
strokeColor: '#00FF00',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 3,
|
||||
geodesic: true
|
||||
}
|
||||
circle = new google.maps.Polyline(circleOptions);
|
||||
circle.setMap(map);
|
||||
|
||||
var envelopeOptions = {
|
||||
strokeColor: '#FF0000',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 3,
|
||||
geodesic: true
|
||||
}
|
||||
envelope = new Array(4);
|
||||
for (var i = 0; i < 4; ++i) {
|
||||
envelope[i] = new google.maps.Polyline(envelopeOptions);
|
||||
envelope[i].setMap(map);
|
||||
}
|
||||
}
|
||||
|
||||
function formatpoint(lat, lon, azi, dmsformat, prec) {
|
||||
prec += 5;
|
||||
if (dmsformat) {
|
||||
var trail = prec < 2 ? dms.DEGREE :
|
||||
(prec < 4 ? dms.MINUTE : dms.SECOND);
|
||||
prec = prec < 2 ? prec : (prec < 4 ? prec - 2 : prec - 4);
|
||||
return (dms.Encode(lat, trail, prec, dms.LATITUDE) + " " +
|
||||
dms.Encode(lon, trail, prec, dms.LONGITUDE) + " " +
|
||||
dms.Encode(azi, trail, prec, dms.AZIMUTH));
|
||||
} else {
|
||||
return (lat.toFixed(prec) + " " +
|
||||
lon.toFixed(prec) + " " +
|
||||
azi .toFixed(prec));
|
||||
}
|
||||
}
|
||||
|
||||
function GeodesicInverse(input) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a blank-delimited line: lat1 lon1 lat2 lon2
|
||||
var t = new String(input);
|
||||
t = t.replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,6);
|
||||
if (t.length != 4)
|
||||
throw new Error("Need 4 input items");
|
||||
var p1 = GeographicLib.DMS.DecodeLatLon(t[0], t[1]);
|
||||
var p2 = GeographicLib.DMS.DecodeLatLon(t[2], t[3]);
|
||||
var v = geod.Inverse(p1.lat, p1.lon, p2.lat, p2.lon);
|
||||
result.status = "OK";
|
||||
result.p1 = formatpoint(v.lat1, v.lon1, v.azi1, true, 0);
|
||||
result.p2 = formatpoint(v.lat2, v.lon2, v.azi2, true, 0);
|
||||
result.s12 = v.s12.toFixed(0);
|
||||
draw(v);
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.p1 = "";
|
||||
result.p2 = "";
|
||||
result.s12 = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function GeodesicDirect(input) {
|
||||
var result = {};
|
||||
try {
|
||||
// Input is a blank-delimited line: lat1 lon1 azi1 s12
|
||||
var t = new String(input);
|
||||
t = t.replace(/^\s+/,"").replace(/\s+$/,"").split(/[\s,]+/,6);
|
||||
if (t.length != 4)
|
||||
throw new Error("Need 4 input items");
|
||||
var p1 = GeographicLib.DMS.DecodeLatLon(t[0], t[1]);
|
||||
var azi1 = GeographicLib.DMS.DecodeAzimuth(t[2]);
|
||||
var s12 = parseFloat(t[3]);
|
||||
var v = geod.Direct(p1.lat, p1.lon, azi1, s12);
|
||||
result.status = "OK";
|
||||
result.p1 = formatpoint(v.lat1, v.lon1, v.azi1, true, 0);
|
||||
result.p2 = formatpoint(v.lat2, v.lon2, v.azi2, true, 0);
|
||||
result.s12 = v.s12.toFixed(0);
|
||||
draw(v);
|
||||
}
|
||||
catch (e) {
|
||||
result.status = "ERROR: " + e.message;
|
||||
result.p1 = "";
|
||||
result.p2 = "";
|
||||
result.s12 = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function draw(v) {
|
||||
var points = geod.DirectPath(v.lat1, v.lon1, v.azi1, v.s12,
|
||||
100000, 100);
|
||||
clearPaths();
|
||||
var i, k, path;
|
||||
|
||||
path = geodesic.getPath();
|
||||
for (k = 0; k < points.length; ++k)
|
||||
path.push(new google.maps.LatLng(points[k].lat, points[k].lon));
|
||||
points = geod.Circle(v.lat1, v.lon1, v.azi1, v.s12, 72);
|
||||
path = circle.getPath();
|
||||
for (k = 0; k < points.length; ++k)
|
||||
path.push(new google.maps.LatLng(points[k].lat, points[k].lon));
|
||||
for (i = 0; i < 4; ++i) {
|
||||
points = geod.Envelope(v.lat1, v.lon1, 72, i+1);
|
||||
path = envelope[i].getPath();
|
||||
for (k = 0; k < points.length; ++k)
|
||||
path.push(new google.maps.LatLng(points[k].lat, points[k].lon));
|
||||
}
|
||||
map.panTo(new google.maps.LatLng(v.lat2, v.lon2));
|
||||
}
|
||||
|
||||
function clearPaths() {
|
||||
cPath = geodesic.getPath();
|
||||
while (cPath.getLength()) cPath.pop();
|
||||
cPath = circle.getPath();
|
||||
while (cPath.getLength()) cPath.pop();
|
||||
for (var i = 0; i < 4; ++i) {
|
||||
cPath = envelope[i].getPath();
|
||||
while (cPath.getLength()) cPath.pop();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initialize()">
|
||||
<div id="map-canvas"
|
||||
style="position:relative; border: 1px solid black; width:99.5%;
|
||||
height:72%;">
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
Direct:
|
||||
<input id="inputb" size=60 value="41°19'S 174°49'E 135° 60000e3" />
|
||||
<input type="button" value="compute"
|
||||
onclick="var t = GeodesicDirect(document.getElementById('inputb').value);
|
||||
document.getElementById('status').value = t.status;
|
||||
document.getElementById('p1').value = t.p1;
|
||||
document.getElementById('p2').value = t.p2;
|
||||
document.getElementById('s12').value = t.s12;" />
|
||||
</p>
|
||||
<p>
|
||||
Inverse:
|
||||
<input id="inputa" size=60 value="41°19'S 174°49'E 40°58'N 5°30'W" />
|
||||
<input type="button" value="compute"
|
||||
onclick="var t = GeodesicInverse(document.getElementById('inputa').value);
|
||||
document.getElementById('status').value = t.status;
|
||||
document.getElementById('p1').value = t.p1;
|
||||
document.getElementById('p2').value = t.p2;
|
||||
document.getElementById('s12').value = t.s12;" />
|
||||
</p>
|
||||
<p>
|
||||
lat1 lon1 azi1: <input type="text" "readonly" id="p1" size=60>
|
||||
</p>
|
||||
<p>
|
||||
lat2 lon2 azi2: <input type="text" "readonly" id="p2" size=60>
|
||||
</p>
|
||||
<p>
|
||||
s12: <input type="text" "readonly" id="s12" size=20>
|
||||
status: <input "readonly" id="status" size=30>
|
||||
|
||||
<a href="geod-google-instructions.html"><b>INSTRUCTIONS HERE</b></a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<title>
|
||||
Krueger's series for the transverse Mercator projection
|
||||
</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<body>
|
||||
<h2>
|
||||
Krueger's series for the transverse Mercator projection
|
||||
|
|
@ -12,22 +13,22 @@
|
|||
order in the flattening. See
|
||||
<blockquote>
|
||||
Louis Krueger,
|
||||
<a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28">
|
||||
<a href="https://doi.org/10.2312/GFZ.b103-krueger28">
|
||||
Konforme Abbildung des Erdellipsoids in der Ebene</a>,
|
||||
Royal Prussian Geodetic Institute, New Series 52, 172 pp. (1912),
|
||||
DOI:
|
||||
<a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28">
|
||||
<a href="https://doi.org/10.2312/GFZ.b103-krueger28">
|
||||
10.2312/GFZ.b103-krueger28</a>
|
||||
</blockquote>
|
||||
and
|
||||
<blockquote>
|
||||
Charles F. F. Karney,
|
||||
<a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
|
||||
<a href="https://doi.org/10.1007/s00190-011-0445-3">
|
||||
Transverse Mercator with an accuracy of a few nanometers</a>,
|
||||
J. Geodesy 85(8), 475–485 (Aug. 2011); preprint
|
||||
<a href="http://arxiv.org/abs/1002.1417">arXiv:1002.1417</a>;
|
||||
<a href="https://arxiv.org/abs/1002.1417">arXiv:1002.1417</a>;
|
||||
resource page
|
||||
<a href="http://geographiclib.sf.net/tm.html">tm.html</a>.
|
||||
<a href="https://geographiclib.sourceforge.io/tm.html">tm.html</a>.
|
||||
</blockquote>
|
||||
<pre>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<title>GeographicLib-@PROJECT_VERSION@ utilities</title>
|
||||
<meta HTTP-EQUIV="Refresh"
|
||||
CONTENT="0; URL=http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html">
|
||||
CONTENT="0; URL=https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html">
|
||||
</head>
|
||||
<body topmargin=10 leftmargin=10>
|
||||
<h3>
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
Online documentation for utilities for GeographicLib version
|
||||
@PROJECT_VERSION@ is available at
|
||||
<center>
|
||||
<a href="http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html">
|
||||
http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html</a>.
|
||||
<a href="https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html">
|
||||
https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html</a>.
|
||||
</center>
|
||||
<br>
|
||||
You will be redirected there. Click on the link to go there
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Accumulator.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -22,7 +22,7 @@ namespace NETGeographicLib
|
|||
precision of the sum is 106 bits or about 32 decimal places.
|
||||
|
||||
The implementation follows J. R. Shewchuk,
|
||||
<a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
|
||||
<a href="https://doi.org/10.1007/PL00009321"> Adaptive Precision
|
||||
Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
|
||||
Discrete & Computational Geometry 18(3) 305--363 (1997).
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/AlbersEqualArea.hpp"
|
||||
|
|
@ -33,13 +33,13 @@ AlbersEqualArea::AlbersEqualArea( StandardTypes type )
|
|||
switch ( type )
|
||||
{
|
||||
case StandardTypes::CylindricalEqualArea:
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::CylindricalEqualArea );
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::CylindricalEqualArea() );
|
||||
break;
|
||||
case StandardTypes::AzimuthalEqualAreaNorth:
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::AzimuthalEqualAreaNorth );
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::AzimuthalEqualAreaNorth() );
|
||||
break;
|
||||
case StandardTypes::AzimuthalEqualAreaSouth:
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::AzimuthalEqualAreaSouth );
|
||||
m_pAlbersEqualArea = new GeographicLib::AlbersEqualArea( GeographicLib::AlbersEqualArea::AzimuthalEqualAreaSouth() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -97,8 +97,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] stdlat standard parallel (degrees), the circle of tangency.
|
||||
* @param[in] k0 azimuthal scale on the standard parallel.
|
||||
* @exception GeographicErr if \e a, (1 − \e f ) \e a, or \e k0 is
|
||||
|
|
@ -113,8 +112,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] stdlat1 first standard parallel (degrees).
|
||||
* @param[in] stdlat2 second standard parallel (degrees).
|
||||
* @param[in] k1 azimuthal scale on the standard parallels.
|
||||
|
|
@ -131,8 +129,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] sinlat1 sine of first standard parallel.
|
||||
* @param[in] coslat1 cosine of first standard parallel.
|
||||
* @param[in] sinlat2 sine of second standard parallel.
|
||||
|
|
@ -180,12 +177,11 @@ namespace NETGeographicLib
|
|||
* @param[out] k azimuthal scale of projection at point; the radial
|
||||
* scale is the 1/\e k.
|
||||
*
|
||||
* The latitude origin is given by AlbersEqualArea::LatitudeOrigin(). No
|
||||
* false easting or northing is added and \e lat should be in the range
|
||||
* [−90°, 90°]; \e lon and \e lon0 should be in the
|
||||
* range [−540°, 540°). The values of \e x and \e y
|
||||
* returned for points which project to infinity (i.e., one or both of the
|
||||
* poles) will be large but finite.
|
||||
* The latitude origin is given by AlbersEqualArea::LatitudeOrigin().
|
||||
* No false easting or northing is added and \e lat should be in the
|
||||
* range [−90°, 90°]. The values of \e x and \e y
|
||||
* returned for points which project to infinity (i.e., one or both of
|
||||
* the poles) will be large but finite.
|
||||
**********************************************************************/
|
||||
void Forward(double lon0, double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% x,
|
||||
|
|
@ -205,12 +201,11 @@ namespace NETGeographicLib
|
|||
* @param[out] k azimuthal scale of projection at point; the radial
|
||||
* scale is the 1/\e k.
|
||||
*
|
||||
* The latitude origin is given by AlbersEqualArea::LatitudeOrigin(). No
|
||||
* false easting or northing is added. \e lon0 should be in the range
|
||||
* [−540°, 540°). The value of \e lon returned is in
|
||||
* the range [−180°, 180°). The value of \e lat
|
||||
* returned is in the range [−90°, 90°]. If the
|
||||
* input point is outside the legal projected space the nearest pole is
|
||||
* The latitude origin is given by AlbersEqualArea::LatitudeOrigin().
|
||||
* No false easting or northing is added. The value of \e lon returned
|
||||
* is in the range [−180°, 180°). The value of \e lat
|
||||
* returned is in the range [−90°, 90°]. If the input
|
||||
* point is outside the legal projected space the nearest pole is
|
||||
* returned.
|
||||
**********************************************************************/
|
||||
void Reverse(double lon0, double x, double y,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/AzimuthalEquidistant.hpp"
|
||||
|
|
@ -32,7 +32,7 @@ AzimuthalEquidistant::AzimuthalEquidistant(void)
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pAzimuthalEquidistant = new GeographicLib::AzimuthalEquidistant( GeographicLib::Geodesic::WGS84 );
|
||||
m_pAzimuthalEquidistant = new GeographicLib::AzimuthalEquidistant( GeographicLib::Geodesic::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
#include "Geodesic.h"
|
||||
|
|
@ -86,13 +86,12 @@ namespace NETGeographicLib
|
|||
* @param[out] azi azimuth of geodesic at point (degrees).
|
||||
* @param[out] rk reciprocal of azimuthal scale at point.
|
||||
*
|
||||
* \e lat0 and \e lat should be in the range [−90°,
|
||||
* 90°] and \e lon0 and \e lon should be in the range
|
||||
* [−540°, 540°). The scale of the projection is 1
|
||||
* in the "radial" direction, \e azi clockwise from true north, and is 1/\e
|
||||
* rk in the direction perpendicular to this. A call to Forward followed
|
||||
* by a call to Reverse will return the original (\e lat, \e lon) (to
|
||||
* within roundoff).
|
||||
* \e lat0 and \e lat should be in the range [−90°, 90°].
|
||||
* The scale of the projection is 1 in the "radial" direction, \e azi
|
||||
* clockwise from true north, and is 1/\e rk in the direction
|
||||
* perpendicular to this. A call to Forward followed by a call to
|
||||
* Reverse will return the original (\e lat, \e lon) (to within
|
||||
* roundoff).
|
||||
**********************************************************************/
|
||||
void Forward(double lat0, double lon0, double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% x,
|
||||
|
|
@ -112,15 +111,14 @@ namespace NETGeographicLib
|
|||
* @param[out] azi azimuth of geodesic at point (degrees).
|
||||
* @param[out] rk reciprocal of azimuthal scale at point.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°] and \e
|
||||
* lon0 should be in the range [−540°, 540°). \e lat
|
||||
* will be in the range [−90°, 90°] and \e lon will
|
||||
* be in the range [−180°, 180°). The scale of the
|
||||
* projection is 1 in the "radial" direction, \e azi clockwise from true
|
||||
* north, and is 1/\e rk in the direction perpendicular to this. A call to
|
||||
* Reverse followed by a call to Forward will return the original (\e x, \e
|
||||
* y) (to roundoff) only if the geodesic to (\e x, \e y) is a shortest
|
||||
* path.
|
||||
* \e lat0 should be in the range [−90°, 90°]. \e lat
|
||||
* will be in the range [−90°, 90°] and \e lon will be in
|
||||
* the range [−180°, 180°). The scale of the projection
|
||||
* is 1 in the "radial" direction, \e azi clockwise from true north,
|
||||
* and is 1/\e rk in the direction perpendicular to this. A call to
|
||||
* Reverse followed by a call to Forward will return the original (\e
|
||||
* x, \e y) (to roundoff) only if the geodesic to (\e x, \e y) is a
|
||||
* shortest path.
|
||||
**********************************************************************/
|
||||
void Reverse(double lat0, double lon0, double x, double y,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
|
|
|
|||
|
|
@ -11,32 +11,44 @@ set_target_properties (${NETGEOGRAPHICLIB_LIBRARIES}
|
|||
string (REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
string (REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if (MSVC AND NOT MSVC_VERSION GREATER 1600)
|
||||
# Disable "already imported" and "unsupported default parameter"
|
||||
# warnings with VS 10
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4945 /wd4564")
|
||||
endif ()
|
||||
|
||||
add_definitions (${PROJECT_DEFINITIONS})
|
||||
target_link_libraries (${NETGEOGRAPHICLIB_LIBRARIES} ${PROJECT_LIBRARIES})
|
||||
|
||||
# Set the version number on the library
|
||||
set_target_properties (${NETGEOGRAPHICLIB_LIBRARIES} PROPERTIES
|
||||
VERSION "${LIBVERSIONFULL}" OUTPUT_NAME ${NETLIBNAME}
|
||||
PDB_NAME ${NETLIBNAME}${CMAKE_DEBUG_POSTFIX})
|
||||
VERSION "${LIBVERSIONFULL}" OUTPUT_NAME ${NETLIBNAME})
|
||||
|
||||
# Specify where the library is installed, adding it to the export depends
|
||||
# Specify where the library is installed, adding it to the export targets
|
||||
install (TARGETS ${NETGEOGRAPHICLIB_LIBRARIES}
|
||||
EXPORT depends
|
||||
EXPORT targets
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
if (PACKAGE_DEBUG_LIBS)
|
||||
install (PROGRAMS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug/${NETLIBNAME}${CMAKE_DEBUG_POSTFIX}.dll"
|
||||
"${PROJECT_BINARY_DIR}/bin/Debug/${NETLIBNAME}${CMAKE_DEBUG_POSTFIX}.dll"
|
||||
DESTINATION bin CONFIGURATIONS Release)
|
||||
endif ()
|
||||
|
||||
# Install pdb file in debug mode.
|
||||
get_target_property (_P ${NETGEOGRAPHICLIB_LIBRARIES} LOCATION_DEBUG)
|
||||
get_filename_component (_P ${_P} PATH)
|
||||
get_target_property (_N ${NETGEOGRAPHICLIB_LIBRARIES} PDB_NAME)
|
||||
set (_PDB ${_P}/${_N}.pdb)
|
||||
install (FILES ${_PDB} DESTINATION bin
|
||||
RENAME ${NETLIBNAME}${CMAKE_DEBUG_POSTFIX}.pdb CONFIGURATIONS Debug)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
# Suppress 3.0 warnings about use of the LOCATION target property
|
||||
cmake_policy (SET CMP0026 OLD)
|
||||
endif ()
|
||||
|
||||
# Install pdb file.
|
||||
foreach (_c ${CMAKE_CONFIGURATION_TYPES})
|
||||
string (TOUPPER ${_c} _C)
|
||||
get_target_property (_P ${NETGEOGRAPHICLIB_LIBRARIES} LOCATION_${_C})
|
||||
get_filename_component (_D ${_P} PATH)
|
||||
get_filename_component (_N ${_P} NAME_WE)
|
||||
set (_PDB ${_D}/${_N}.pdb)
|
||||
install (FILES ${_PDB} DESTINATION bin CONFIGURATIONS ${_c} OPTIONAL)
|
||||
endforeach ()
|
||||
|
||||
# Put all the library into a folder in the IDE
|
||||
set_property (TARGET ${NETGEOGRAPHICLIB_LIBRARIES} PROPERTY FOLDER library)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/CassiniSoldner.hpp"
|
||||
|
|
@ -33,7 +33,7 @@ CassiniSoldner::CassiniSoldner(double lat0, double lon0)
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pCassiniSoldner = new GeographicLib::CassiniSoldner( GeographicLib::Geodesic::WGS84 );
|
||||
m_pCassiniSoldner = new GeographicLib::CassiniSoldner( GeographicLib::Geodesic::WGS84() );
|
||||
m_pCassiniSoldner->Reset(lat0, lon0);
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -93,8 +93,7 @@ namespace NETGeographicLib
|
|||
* @param[in] earth the Geodesic object to use for geodesic calculations.
|
||||
* By default this uses the WGS84 ellipsoid.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°] and \e
|
||||
* lon0 should be in the range [−540°, 540°).
|
||||
* \e lat0 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
CassiniSoldner(double lat0, double lon0, Geodesic^ earth );
|
||||
|
||||
|
|
@ -110,8 +109,7 @@ namespace NETGeographicLib
|
|||
* @param[in] lat0 latitude of center point of projection (degrees).
|
||||
* @param[in] lon0 longitude of center point of projection (degrees).
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°] and \e
|
||||
* lon0 should be in the range [−540°, 540°).
|
||||
* \e lat0 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
void Reset(double lat0, double lon0);
|
||||
|
||||
|
|
@ -125,9 +123,8 @@ namespace NETGeographicLib
|
|||
* @param[out] azi azimuth of easting direction at point (degrees).
|
||||
* @param[out] rk reciprocal of azimuthal northing scale at point.
|
||||
*
|
||||
* \e lat should be in the range [−90°, 90°] and \e
|
||||
* lon should be in the range [−540°, 540°). A call
|
||||
* to Forward followed by a call to Reverse will return the original (\e
|
||||
* \e lat should be in the range [−90°, 90°]. A call to
|
||||
* Forward followed by a call to Reverse will return the original (\e
|
||||
* lat, \e lon) (to within roundoff). The routine does nothing if the
|
||||
* origin has not been set.
|
||||
**********************************************************************/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/CircularEngine.hpp"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/DMS.hpp"
|
||||
|
|
@ -32,30 +32,17 @@ double DMS::Decode( System::String^ dms,
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double DMS::Decode(System::String^ str)
|
||||
{
|
||||
try
|
||||
{
|
||||
return GeographicLib::DMS::Decode(StringConvert::ManagedToUnmanaged(str));
|
||||
}
|
||||
catch ( const std::exception& xcpt )
|
||||
{
|
||||
throw gcnew GeographicErr( xcpt.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void DMS::DecodeLatLon(System::String^ dmsa, System::String^ dmsb,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
[System::Runtime::InteropServices::Out] double% lon,
|
||||
bool swaplatlong )
|
||||
bool longfirst )
|
||||
{
|
||||
try
|
||||
{
|
||||
double llat, llon;
|
||||
GeographicLib::DMS::DecodeLatLon( StringConvert::ManagedToUnmanaged( dmsa ),
|
||||
StringConvert::ManagedToUnmanaged( dmsb ), llat, llon, swaplatlong );
|
||||
StringConvert::ManagedToUnmanaged( dmsb ), llat, llon, longfirst );
|
||||
lat = llat;
|
||||
lon = llon;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -95,37 +95,62 @@ public:
|
|||
* Degrees, minutes, and seconds are indicated by the characters d, '
|
||||
* (single quote), " (double quote), and these components may only be
|
||||
* given in this order. Any (but not all) components may be omitted and
|
||||
* other symbols (e.g., the ° symbol for degrees and the unicode
|
||||
* prime and double prime symbols for minutes and seconds) may be
|
||||
* substituted. The last component indicator may be omitted and is assumed
|
||||
* to be the next smallest unit (thus 33d10 is interpreted as 33d10'). The
|
||||
* final component may be a decimal fraction but the non-final components
|
||||
* must be integers. Instead of using d, ', and " to indicate
|
||||
* degrees, minutes, and seconds, : (colon) may be used to <i>separate</i>
|
||||
* these components (numbers must appear before and after each colon); thus
|
||||
* 50d30'10.3" may be written as 50:30:10.3, 5.5' may be written
|
||||
* 0:5.5, and so on. The integer parts of the minutes and seconds
|
||||
* components must be less than 60. A single leading sign is permitted. A
|
||||
* hemisphere designator (N, E, W, S) may be added to the beginning or end
|
||||
* of the string. The result is multiplied by the implied sign of the
|
||||
* hemisphere designator (negative for S and W). In addition \e ind is set
|
||||
* to DMS::LATITUDE if N or S is present, to DMS::LONGITUDE if E or W is
|
||||
* present, and to DMS::NONE otherwise. Throws an error on a malformed
|
||||
* string. No check is performed on the range of the result. Examples of
|
||||
* legal and illegal strings are
|
||||
* other symbols (e.g., the ° symbol for degrees and the unicode prime
|
||||
* and double prime symbols for minutes and seconds) may be substituted;
|
||||
* two single quotes can be used instead of ". The last component
|
||||
* indicator may be omitted and is assumed to be the next smallest unit
|
||||
* (thus 33d10 is interpreted as 33d10'). The final component may be a
|
||||
* decimal fraction but the non-final components must be integers. Instead
|
||||
* of using d, ', and " to indicate degrees, minutes, and seconds, :
|
||||
* (colon) may be used to <i>separate</i> these components (numbers must
|
||||
* appear before and after each colon); thus 50d30'10.3" may be
|
||||
* written as 50:30:10.3, 5.5' may be written 0:5.5, and so on. The
|
||||
* integer parts of the minutes and seconds components must be less
|
||||
* than 60. A single leading sign is permitted. A hemisphere designator
|
||||
* (N, E, W, S) may be added to the beginning or end of the string. The
|
||||
* result is multiplied by the implied sign of the hemisphere designator
|
||||
* (negative for S and W). In addition \e ind is set to DMS::LATITUDE if N
|
||||
* or S is present, to DMS::LONGITUDE if E or W is present, and to
|
||||
* DMS::NONE otherwise. Throws an error on a malformed string. No check
|
||||
* is performed on the range of the result. Examples of legal and illegal
|
||||
* strings are
|
||||
* - <i>LEGAL</i> (all the entries on each line are equivalent)
|
||||
* - -20.51125, 20d30'40.5"S, -20°30'40.5, -20d30.675,
|
||||
* N-20d30'40.5", -20:30:40.5
|
||||
* - 4d0'9, 4d9", 4d9'', 4:0:9, 004:00:09, 4.0025, 4.0025d, 4d0.15,
|
||||
* 04:.15
|
||||
* - 4:59.99999999999999, 4:60.0, 4:59:59.9999999999999, 4:59:60.0, 5
|
||||
* - <i>ILLEGAL</i> (the exception thrown explains the problem)
|
||||
* - 4d5"4', 4::5, 4:5:, :4:5, 4d4.5'4", -N20.5, 1.8e2d, 4:60,
|
||||
* 4d-5'
|
||||
* 4:59:60
|
||||
*
|
||||
* The decoding operation can also perform addition and subtraction
|
||||
* operations. If the string includes <i>internal</i> signs (i.e., not at
|
||||
* the beginning nor immediately after an initial hemisphere designator),
|
||||
* then the string is split immediately before such signs and each piece is
|
||||
* decoded according to the above rules and the results added; thus
|
||||
* <code>S3-2.5+4.1N</code> is parsed as the sum of <code>S3</code>,
|
||||
* <code>-2.5</code>, <code>+4.1N</code>. Any piece can include a
|
||||
* hemisphere designator; however, if multiple designators are given, they
|
||||
* must compatible; e.g., you cannot mix N and E. In addition, the
|
||||
* designator can appear at the beginning or end of the first piece, but
|
||||
* must be at the end of all subsequent pieces (a hemisphere designator is
|
||||
* not allowed after the initial sign). Examples of legal and illegal
|
||||
* combinations are
|
||||
* - <i>LEGAL</i> (these are all equivalent)
|
||||
* - 070:00:45, 70:01:15W+0:0.5, 70:01:15W-0:0:30W, W70:01:15+0:0:30E
|
||||
* - <i>ILLEGAL</i> (the exception thrown explains the problem)
|
||||
* - 70:01:15W+0:0:15N, W70:01:15+W0:0:15
|
||||
*
|
||||
* <b>WARNING:</b> "Exponential" notation is not recognized. Thus
|
||||
* <code>7.0E1</code> is illegal, while <code>7.0E+1</code> is parsed as
|
||||
* <code>(7.0E) + (+1)</code>, yielding the same result as
|
||||
* <code>8.0E</code>.
|
||||
*
|
||||
* <b>NOTE:</b> At present, all the string handling in the C++
|
||||
* implementation %GeographicLib is with 8-bit characters. The support for
|
||||
* unicode symbols for degrees, minutes, and seconds is therefore via the
|
||||
* <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding. (The
|
||||
* <a href="https://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding. (The
|
||||
* JavaScript implementation of this class uses unicode natively, of
|
||||
* course.)
|
||||
*
|
||||
|
|
@ -169,27 +194,14 @@ public:
|
|||
static double Decode(double d, double m, double s )
|
||||
{ return d + (m + s/double(60))/double(60); }
|
||||
|
||||
/// \cond SKIP
|
||||
/**
|
||||
* <b>DEPRECATED</b> (use Utility::num, instead).
|
||||
* Convert a string to a double number.
|
||||
*
|
||||
* @param[in] str string input.
|
||||
* @exception GeographicErr if \e str is malformed.
|
||||
* @return decoded number.
|
||||
**********************************************************************/
|
||||
static double Decode(System::String^ str);
|
||||
/// \endcond
|
||||
|
||||
/**
|
||||
* Convert a pair of strings to latitude and longitude.
|
||||
*
|
||||
* @param[in] dmsa first string.
|
||||
* @param[in] dmsb second string.
|
||||
* @param[out] lat latitude.
|
||||
* @param[out] lon longitude reduced to the range [−180°,
|
||||
* 180°).
|
||||
* @param[in] swaplatlong if true assume longitude is given before latitude
|
||||
* @param[out] lat latitude (degrees).
|
||||
* @param[out] lon longitude (degrees).
|
||||
* @param[in] longfirst if true assume longitude is given before latitude
|
||||
* in the absence of hemisphere designators (default false).
|
||||
* @exception GeographicErr if \e dmsa or \e dmsb is malformed.
|
||||
* @exception GeographicErr if \e dmsa and \e dmsb are both interpreted as
|
||||
|
|
@ -198,8 +210,6 @@ public:
|
|||
* longitudes.
|
||||
* @exception GeographicErr if decoded latitude is not in [−90°,
|
||||
* 90°].
|
||||
* @exception GeographicErr if decoded longitude is not in
|
||||
* [−540°, 540°).
|
||||
*
|
||||
* By default, the \e lat (resp., \e lon) is assigned to the results of
|
||||
* decoding \e dmsa (resp., \e dmsb). However this is overridden if either
|
||||
|
|
@ -210,7 +220,7 @@ public:
|
|||
static void DecodeLatLon(System::String^ dmsa, System::String^ dmsb,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
[System::Runtime::InteropServices::Out] double% lon,
|
||||
bool swaplatlong );
|
||||
bool longfirst );
|
||||
|
||||
/**
|
||||
* Convert a string to an angle in degrees.
|
||||
|
|
@ -231,8 +241,6 @@ public:
|
|||
* @param[in] azistr input string.
|
||||
* @exception GeographicErr if \e azistr is malformed.
|
||||
* @exception GeographicErr if \e azistr includes a N/S designator.
|
||||
* @exception GeographicErr if decoded azimuth is not in
|
||||
* [−540°, 540°).
|
||||
* @return azimuth (degrees) reduced to the range [−180°,
|
||||
* 180°).
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Ellipsoid.hpp"
|
||||
|
|
@ -32,7 +32,7 @@ Ellipsoid::Ellipsoid()
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pEllipsoid = new GeographicLib::Ellipsoid( GeographicLib::Ellipsoid::WGS84 );
|
||||
m_pEllipsoid = new GeographicLib::Ellipsoid( GeographicLib::Ellipsoid::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ namespace NETGeographicLib
|
|||
// A pointer to the unmanaged GeographicLib::Ellipsoid
|
||||
GeographicLib::Ellipsoid* m_pEllipsoid;
|
||||
|
||||
// Th efinalizer frees the unmanaged memory when the object is destroyed.
|
||||
// The finalizer frees the unmanaged memory when the object is destroyed.
|
||||
!Ellipsoid();
|
||||
public:
|
||||
/** \name Constructor
|
||||
|
|
@ -67,8 +67,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @exception GeographicErr if \e a or (1 − \e f ) \e a is not
|
||||
* positive.
|
||||
**********************************************************************/
|
||||
|
|
@ -402,9 +401,8 @@ namespace NETGeographicLib
|
|||
* section at latitude φ inclined at an angle \e azi to the
|
||||
* meridian (meters).
|
||||
*
|
||||
* φ must lie in the range [−90°, 90°] and \e
|
||||
* azi must lie in the range [−540°, 540°); the
|
||||
* result is undefined if either of conditions does not hold.
|
||||
* φ must lie in the range [−90°, 90°]; the
|
||||
* result is undefined if this condition does not hold.
|
||||
**********************************************************************/
|
||||
double NormalCurvatureRadius(double phi, double azi);
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/EllipticFunction.hpp"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -43,14 +43,14 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The computation of the elliptic integrals uses the algorithms given in
|
||||
* - B. C. Carlson,
|
||||
* <a href="http://dx.doi.org/10.1007/BF02198293"> Computation of real or
|
||||
* <a href="https://doi.org/10.1007/BF02198293"> Computation of real or
|
||||
* complex elliptic integrals</a>, Numerical Algorithms 10, 13--26 (1995)
|
||||
* .
|
||||
* with the additional optimizations given in http://dlmf.nist.gov/19.36.i.
|
||||
* The computation of the Jacobi elliptic functions uses the algorithm given
|
||||
* in
|
||||
* - R. Bulirsch,
|
||||
* <a href="http://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of
|
||||
* <a href="https://doi.org/10.1007/BF01397975"> Numerical Calculation of
|
||||
* Elliptic Integrals and Elliptic Functions</a>, Numericshe Mathematik 7,
|
||||
* 78--90 (1965).
|
||||
* .
|
||||
|
|
@ -365,7 +365,7 @@ namespace NETGeographicLib
|
|||
* Legendre expresses the longitude of a point on the geodesic in terms of
|
||||
* this combination of elliptic integrals in Exercices de Calcul
|
||||
* Intégral, Vol. 1 (1811), p. 181,
|
||||
* http://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
|
||||
* https://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
|
||||
*
|
||||
* See \ref geodellip for the expression for the longitude in terms of this
|
||||
* function.
|
||||
|
|
@ -392,7 +392,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* Cayley expresses the longitude difference of a point on the geodesic in
|
||||
* terms of this combination of elliptic integrals in Phil. Mag. <b>40</b>
|
||||
* (1870), p. 333, http://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
|
||||
* (1870), p. 333, https://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
|
||||
*
|
||||
* See \ref geodellip for the expression for the longitude in terms of this
|
||||
* function.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* \file NETGeographicLib/GARS.cpp
|
||||
* \brief Source for NETGeographicLib::GARS class
|
||||
*
|
||||
* NETGeographicLib is copyright (c) Scott Heiman (2013-2015)
|
||||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GARS.hpp"
|
||||
#include "GARS.h"
|
||||
#include "NETGeographicLib.h"
|
||||
|
||||
using namespace NETGeographicLib;
|
||||
|
||||
//*****************************************************************************
|
||||
void GARS::Forward(double lat, double lon, int prec, System::String^% gars)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string l;
|
||||
GeographicLib::GARS::Forward( lat, lon, prec, l );
|
||||
gars = gcnew System::String( l.c_str() );
|
||||
}
|
||||
catch ( const std::exception& xcpt )
|
||||
{
|
||||
throw gcnew GeographicErr( xcpt.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void GARS::Reverse( System::String^ gars, double% lat, double% lon,
|
||||
int% prec, bool centerp)
|
||||
{
|
||||
try
|
||||
{
|
||||
double llat, llon;
|
||||
int lprec;
|
||||
GeographicLib::GARS::Reverse( StringConvert::ManagedToUnmanaged( gars ),
|
||||
llat, llon, lprec, centerp );
|
||||
lat = llat;
|
||||
lon = llon;
|
||||
prec = lprec;
|
||||
}
|
||||
catch ( const std::exception& err )
|
||||
{
|
||||
throw gcnew GeographicErr( err.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double GARS::Resolution(int prec) { return GeographicLib::GARS::Resolution(prec); }
|
||||
|
||||
//*****************************************************************************
|
||||
int GARS::Precision(double res) { return GeographicLib::GARS::Precision(res); }
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
* \file NETGeographicLib/GARS.h
|
||||
* \brief Header for NETGeographicLib::GARS class
|
||||
*
|
||||
* NETGeographicLib is copyright (c) Scott Heiman (2013-2015)
|
||||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
namespace NETGeographicLib
|
||||
{
|
||||
/**
|
||||
* \brief .NET Wrapper for GeographicLib::GARS
|
||||
*
|
||||
* This class allows .NET applications to access GeographicLib::GARS.
|
||||
*
|
||||
* The Global Area Reference System is described in
|
||||
* - https://en.wikipedia.org/wiki/Global_Area_Reference_System
|
||||
* - http://earth-info.nga.mil/GandG/coordsys/grids/gars.html
|
||||
* .
|
||||
* It provides a compact string representation of a geographic area
|
||||
* (expressed as latitude and longitude). The classes Georef and Geohash
|
||||
* implement similar compact representations.
|
||||
*
|
||||
* C# Example:
|
||||
* \include example-GARS.cs
|
||||
* Managed C++ Example:
|
||||
* \include example-GARS.cpp
|
||||
* Visual Basic Example:
|
||||
* \include example-GARS.vb
|
||||
**********************************************************************/
|
||||
public ref class GARS
|
||||
{
|
||||
// all memebers of this class are static so the constructor is hidden.
|
||||
GARS() {}
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Convert from geographic coordinates to GARS.
|
||||
*
|
||||
* @param[in] lat latitude of point (degrees).
|
||||
* @param[in] lon longitude of point (degrees).
|
||||
* @param[in] prec the precision of the resulting GARS.
|
||||
* @param[out] gars the GARS string.
|
||||
* @exception GeographicErr if \e lat is not in [−90°,
|
||||
* 90°] or if memory for \e gars can't be allocated.
|
||||
*
|
||||
* \e prec specifies the precision of \e gars as follows:
|
||||
* - \e prec = 0 (min), 30' precision, e.g., 006AG;
|
||||
* - \e prec = 1, 15' precision, e.g., 006AG3;
|
||||
* - \e prec = 2 (max), 5' precision, e.g., 006AG39.
|
||||
*
|
||||
* If \e lat or \e lon is NaN, then \e gars is set to "INVALID".
|
||||
**********************************************************************/
|
||||
static void Forward(double lat, double lon, int prec,
|
||||
[System::Runtime::InteropServices::Out] System::String^% gars);
|
||||
|
||||
/**
|
||||
* Convert from GARS to geographic coordinates.
|
||||
*
|
||||
* @param[in] gars the GARS.
|
||||
* @param[out] lat latitude of point (degrees).
|
||||
* @param[out] lon longitude of point (degrees).
|
||||
* @param[out] prec the precision of \e gars.
|
||||
* @param[in] centerp if true (the default) return the center of the
|
||||
* \e gars, otherwise return the south-west corner.
|
||||
* @exception GeographicErr if \e gars is illegal.
|
||||
*
|
||||
* The case of the letters in \e gars is ignored. \e prec is in the range
|
||||
* [0, 2] and gives the precision of \e gars as follows:
|
||||
* - \e prec = 0 (min), 30' precision, e.g., 006AG;
|
||||
* - \e prec = 1, 15' precision, e.g., 006AG3;
|
||||
* - \e prec = 2 (max), 5' precision, e.g., 006AG39.
|
||||
*
|
||||
* If the first 3 characters of \e gars are "INV", then \e lat and \e lon
|
||||
* are set to NaN and \e prec is unchanged.
|
||||
**********************************************************************/
|
||||
static void Reverse( System::String^ gars,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
[System::Runtime::InteropServices::Out] double% lon,
|
||||
[System::Runtime::InteropServices::Out] int% prec,
|
||||
bool centerp);
|
||||
|
||||
/**
|
||||
* The angular resolution of a GARS.
|
||||
*
|
||||
* @param[in] prec the precision of the GARS.
|
||||
* @return the latitude-longitude resolution (degrees).
|
||||
*
|
||||
* Internally, \e prec is first put in the range [0, 2].
|
||||
**********************************************************************/
|
||||
static double Resolution(int prec);
|
||||
|
||||
/**
|
||||
* The GARS precision required to meet a given geographic resolution.
|
||||
*
|
||||
* @param[in] res the minimum of resolution in latitude and longitude
|
||||
* (degrees).
|
||||
* @return GARS precision.
|
||||
*
|
||||
* The returned length is in the range [0, 2].
|
||||
**********************************************************************/
|
||||
static int Precision(double res);
|
||||
};
|
||||
} // namespace NETGeographicLib
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GeoCoords.hpp"
|
||||
|
|
@ -42,11 +42,11 @@ GeoCoords::GeoCoords()
|
|||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeoCoords::GeoCoords(System::String^ s, bool centerp, bool swaplatlong )
|
||||
GeoCoords::GeoCoords(System::String^ s, bool centerp, bool longfirst )
|
||||
{
|
||||
try
|
||||
{
|
||||
m_pGeoCoords = new GeographicLib::GeoCoords(StringConvert::ManagedToUnmanaged(s), centerp, swaplatlong);
|
||||
m_pGeoCoords = new GeographicLib::GeoCoords(StringConvert::ManagedToUnmanaged(s), centerp, longfirst);
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
@ -93,11 +93,11 @@ GeoCoords::GeoCoords(int zone, bool northp, double easting, double northing)
|
|||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void GeoCoords::Reset( System::String^ s, bool centerp, bool swaplatlong )
|
||||
void GeoCoords::Reset( System::String^ s, bool centerp, bool longfirst )
|
||||
{
|
||||
try
|
||||
{
|
||||
m_pGeoCoords->Reset(StringConvert::ManagedToUnmanaged(s), centerp, swaplatlong);
|
||||
m_pGeoCoords->Reset(StringConvert::ManagedToUnmanaged(s), centerp, longfirst);
|
||||
}
|
||||
catch ( const std::exception& err )
|
||||
{
|
||||
|
|
@ -194,16 +194,16 @@ double GeoCoords::MajorRadius::get() { return UTMUPS::MajorRadius(); }
|
|||
double GeoCoords::Flattening::get() { return UTMUPS::Flattening(); }
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::GeoRepresentation(int prec, bool swaplatlong )
|
||||
System::String^ GeoCoords::GeoRepresentation(int prec, bool longfirst )
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->GeoRepresentation(prec, swaplatlong).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->GeoRepresentation(prec, longfirst).c_str() );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::DMSRepresentation(int prec, bool swaplatlong,
|
||||
System::String^ GeoCoords::DMSRepresentation(int prec, bool longfirst,
|
||||
char dmssep )
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->DMSRepresentation(prec, swaplatlong, dmssep).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->DMSRepresentation(prec, longfirst, dmssep).c_str() );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
|
|
@ -213,15 +213,15 @@ System::String^ GeoCoords::MGRSRepresentation(int prec)
|
|||
}
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::UTMUPSRepresentation(int prec)
|
||||
System::String^ GeoCoords::UTMUPSRepresentation(int prec, bool abbrev)
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->UTMUPSRepresentation(prec).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->UTMUPSRepresentation(prec, abbrev).c_str() );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::UTMUPSRepresentation(bool northp, int prec)
|
||||
System::String^ GeoCoords::UTMUPSRepresentation(bool northp, int prec, bool abbrev)
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->UTMUPSRepresentation(northp, prec).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->UTMUPSRepresentation(northp, prec, abbrev).c_str() );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
|
|
@ -231,13 +231,13 @@ System::String^ GeoCoords::AltMGRSRepresentation(int prec)
|
|||
}
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::AltUTMUPSRepresentation(int prec)
|
||||
System::String^ GeoCoords::AltUTMUPSRepresentation(int prec, bool abbrev)
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->AltUTMUPSRepresentation(prec).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->AltUTMUPSRepresentation(prec, abbrev).c_str() );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
System::String^ GeoCoords::AltUTMUPSRepresentation(bool northp, int prec)
|
||||
System::String^ GeoCoords::AltUTMUPSRepresentation(bool northp, int prec, bool abbrev)
|
||||
{
|
||||
return gcnew System::String( m_pGeoCoords->AltUTMUPSRepresentation(northp, prec).c_str() );
|
||||
return gcnew System::String( m_pGeoCoords->AltUTMUPSRepresentation(northp, prec, abbrev).c_str() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -65,8 +65,7 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
///@{
|
||||
/**
|
||||
* The default constructor is equivalent to \e latitude = 90°,
|
||||
* \e longitude = 0°.
|
||||
* The default constructor sets the coordinate as undefined.
|
||||
**********************************************************************/
|
||||
GeoCoords();
|
||||
|
||||
|
|
@ -77,7 +76,7 @@ namespace NETGeographicLib
|
|||
* the position.
|
||||
* @param[in] centerp governs the interpretation of MGRS coordinates (see
|
||||
* below).
|
||||
* @param[in] swaplatlong governs the interpretation of geographic
|
||||
* @param[in] longfirst governs the interpretation of geographic
|
||||
* coordinates (see below).
|
||||
* @exception GeographicErr if the \e s is malformed (see below).
|
||||
*
|
||||
|
|
@ -95,7 +94,7 @@ namespace NETGeographicLib
|
|||
* - 43d16'12"E 33d26'24"N
|
||||
* - 43:16:12E 33:26:24
|
||||
* - MGRS
|
||||
* - 38SLC301
|
||||
* - 38SLC30
|
||||
* - 38SLC391014
|
||||
* - 38SLC3918701405
|
||||
* - 37SHT9708
|
||||
|
|
@ -105,9 +104,9 @@ namespace NETGeographicLib
|
|||
*
|
||||
* <b>Latitude and Longitude parsing</b>: Latitude precedes longitude,
|
||||
* unless a N, S, E, W hemisphere designator is used on one or both
|
||||
* coordinates. If \e swaplatlong = true (default is false), then
|
||||
* coordinates. If \e longfirst = true (default is false), then
|
||||
* longitude precedes latitude in the absence of a hemisphere designator.
|
||||
* Thus (with \e swaplatlong = false)
|
||||
* Thus (with \e longfirst = false)
|
||||
* - 40 -75
|
||||
* - N40 W75
|
||||
* - -75 N40
|
||||
|
|
@ -129,10 +128,9 @@ namespace NETGeographicLib
|
|||
* - 40:30.5
|
||||
* - 40.508333333
|
||||
* .
|
||||
* all specify the same angle. The leading sign applies to all components
|
||||
* so -1d30 is -(1+30/60) = -1.5. Latitudes must be in the range
|
||||
* [−90°, 90°] and longitudes in the range
|
||||
* [−540°, 540°). Internally longitudes are reduced
|
||||
* all specify the same angle. The leading sign applies to all
|
||||
* components so -1d30 is -(1+30/60) = -1.5. Latitudes must be in the
|
||||
* range [−90°, 90°]. Internally longitudes are reduced
|
||||
* to the range [−180°, 180°).
|
||||
*
|
||||
* <b>UTM/UPS parsing</b>: For UTM zones (−80° ≤ Lat <
|
||||
|
|
@ -156,7 +154,7 @@ namespace NETGeographicLib
|
|||
* - 38SMB4484 = 38N 444000 3684000
|
||||
* - 38SMB44148470 = 38N 444140 3684700
|
||||
**********************************************************************/
|
||||
GeoCoords(System::String^ s, bool centerp, bool swaplatlong );
|
||||
GeoCoords(System::String^ s, bool centerp, bool longfirst );
|
||||
|
||||
/**
|
||||
* Construct from geographic coordinates.
|
||||
|
|
@ -167,8 +165,6 @@ namespace NETGeographicLib
|
|||
* specified zone using the rules given in UTMUPS::zonespec.
|
||||
* @exception GeographicErr if \e latitude is not in [−90°,
|
||||
* 90°].
|
||||
* @exception GeographicErr if \e longitude is not in [−540°,
|
||||
* 540°).
|
||||
* @exception GeographicErr if \e zone cannot be used for this location.
|
||||
**********************************************************************/
|
||||
GeoCoords(double latitude, double longitude, int zone );
|
||||
|
|
@ -192,16 +188,16 @@ namespace NETGeographicLib
|
|||
|
||||
/**
|
||||
* Reset the location from a string. See
|
||||
* GeoCoords(const std::string& s, bool centerp, bool swaplatlong).
|
||||
* GeoCoords(const std::string& s, bool centerp, bool longfirst).
|
||||
*
|
||||
* @param[in] s 1-element, 2-element, or 3-element string representation of
|
||||
* the position.
|
||||
* @param[in] centerp governs the interpretation of MGRS coordinates.
|
||||
* @param[in] swaplatlong governs the interpretation of geographic
|
||||
* @param[in] longfirst governs the interpretation of geographic
|
||||
* coordinates.
|
||||
* @exception GeographicErr if the \e s is malformed.
|
||||
**********************************************************************/
|
||||
void Reset( System::String^ s, bool centerp, bool swaplatlong);
|
||||
void Reset( System::String^ s, bool centerp, bool longfirst);
|
||||
|
||||
/**
|
||||
* Reset the location in terms of geographic coordinates. See
|
||||
|
|
@ -213,8 +209,6 @@ namespace NETGeographicLib
|
|||
* specified zone using the rules given in UTMUPS::zonespec.
|
||||
* @exception GeographicErr if \e latitude is not in [−90°,
|
||||
* 90°].
|
||||
* @exception GeographicErr if \e longitude is not in [−540°,
|
||||
* 540°).
|
||||
* @exception GeographicErr if \e zone cannot be used for this location.
|
||||
**********************************************************************/
|
||||
void Reset(double latitude, double longitude, int zone ) ;
|
||||
|
|
@ -327,7 +321,7 @@ namespace NETGeographicLib
|
|||
* degrees.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m).
|
||||
* @param[in] swaplatlong if true give longitude first (default = false)
|
||||
* @param[in] longfirst if true give longitude first (default = false)
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
* @return decimal latitude/longitude string representation.
|
||||
*
|
||||
|
|
@ -337,14 +331,14 @@ namespace NETGeographicLib
|
|||
* - prec = 3, 10<sup>−8</sup>°
|
||||
* - prec = 9 (max), 10<sup>−14</sup>°
|
||||
**********************************************************************/
|
||||
System::String^ GeoRepresentation(int prec, bool swaplatlong );
|
||||
System::String^ GeoRepresentation(int prec, bool longfirst );
|
||||
|
||||
/**
|
||||
* String representation with latitude and longitude as degrees, minutes,
|
||||
* seconds, and hemisphere.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] swaplatlong if true give longitude first (default = false)
|
||||
* @param[in] longfirst if true give longitude first (default = false)
|
||||
* @param[in] dmssep if non-null, use as the DMS separator character
|
||||
* (instead of d, ', " delimiters).
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
|
|
@ -360,7 +354,7 @@ namespace NETGeographicLib
|
|||
* - prec = 1, 0.01"
|
||||
* - prec = 10 (max), 10<sup>−11</sup>"
|
||||
**********************************************************************/
|
||||
System::String^ DMSRepresentation(int prec, bool swaplatlong,
|
||||
System::String^ DMSRepresentation(int prec, bool longfirst,
|
||||
char dmssep );
|
||||
|
||||
/**
|
||||
|
|
@ -390,6 +384,8 @@ namespace NETGeographicLib
|
|||
* UTM/UPS string.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] abbrev if true (the default) use abbreviated (n/s) notation
|
||||
* for hemisphere; otherwise spell out the hemisphere (north/south)
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
* @return UTM/UPS string representation: zone designator, easting, and
|
||||
* northing.
|
||||
|
|
@ -402,20 +398,22 @@ namespace NETGeographicLib
|
|||
* - prec = 6, 1μm
|
||||
* - prec = 9 (max), 1nm
|
||||
**********************************************************************/
|
||||
System::String^ UTMUPSRepresentation(int prec);
|
||||
System::String^ UTMUPSRepresentation(int prec, bool abbrev);
|
||||
|
||||
/**
|
||||
* UTM/UPS string with hemisphere override.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] northp hemisphere override
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] abbrev if true (the default) use abbreviated (n/s) notation
|
||||
* for hemisphere; otherwise spell out the hemisphere (north/south)
|
||||
* @exception GeographicErr if the hemisphere override attempts to change
|
||||
* UPS N to UPS S or vice verse.
|
||||
* UPS N to UPS S or vice versa.
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
* @return UTM/UPS string representation: zone designator, easting, and
|
||||
* northing.
|
||||
**********************************************************************/
|
||||
System::String^ UTMUPSRepresentation(bool northp, int prec);
|
||||
System::String^ UTMUPSRepresentation(bool northp, int prec, bool abbrev);
|
||||
|
||||
/**
|
||||
* MGRS string for the alternate zone. See GeoCoords::MGRSRepresentation.
|
||||
|
|
@ -431,24 +429,28 @@ namespace NETGeographicLib
|
|||
* GeoCoords::UTMUPSRepresentation.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] abbrev if true (the default) use abbreviated (n/s) notation
|
||||
* for hemisphere; otherwise spell out the hemisphere (north/south)
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
* @return UTM/UPS string representation: zone designator, easting, and
|
||||
* northing.
|
||||
**********************************************************************/
|
||||
System::String^ AltUTMUPSRepresentation(int prec);
|
||||
System::String^ AltUTMUPSRepresentation(int prec, bool abbrev);
|
||||
|
||||
/**
|
||||
* UTM/UPS string for the alternate zone, with hemisphere override.
|
||||
*
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] northp hemisphere override
|
||||
* @param[in] prec precision (relative to about 1m)
|
||||
* @param[in] abbrev if true (the default) use abbreviated (n/s) notation
|
||||
* for hemisphere; otherwise spell out the hemisphere (north/south)
|
||||
* @exception GeographicErr if the hemisphere override attempts to change
|
||||
* UPS N to UPS S or vice verse.
|
||||
* UPS n to UPS s or vice verse.
|
||||
* @exception std::bad_alloc if memory for the string can't be allocated.
|
||||
* @return UTM/UPS string representation: zone designator, easting, and
|
||||
* northing.
|
||||
**********************************************************************/
|
||||
System::String^ AltUTMUPSRepresentation(bool northp, int prec);
|
||||
System::String^ AltUTMUPSRepresentation(bool northp, int prec, bool abbrev);
|
||||
///@}
|
||||
|
||||
/** \name Inspector functions
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Geocentric.hpp"
|
||||
|
|
@ -33,7 +33,7 @@ Geocentric::Geocentric(void)
|
|||
try
|
||||
{
|
||||
m_pGeocentric = new GeographicLib::Geocentric(
|
||||
GeographicLib::Geocentric::WGS84 );
|
||||
GeographicLib::Geocentric::WGS84() );
|
||||
}
|
||||
catch (std::bad_alloc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ namespace NETGeographicLib
|
|||
* The conversion from geographic to geocentric coordinates is
|
||||
* straightforward. For the reverse transformation we use
|
||||
* - H. Vermeille,
|
||||
* <a href="http://dx.doi.org/10.1007/s00190-002-0273-6"> Direct
|
||||
* <a href="https://doi.org/10.1007/s00190-002-0273-6"> Direct
|
||||
* transformation from geocentric coordinates to geodetic coordinates</a>,
|
||||
* J. Geodesy 76, 451--454 (2002).
|
||||
* .
|
||||
|
|
@ -36,11 +36,11 @@ namespace NETGeographicLib
|
|||
* results for all finite inputs (even if \e h is infinite). The changes are
|
||||
* described in Appendix B of
|
||||
* - C. F. F. Karney,
|
||||
* <a href="http://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
* <a href="https://arxiv.org/abs/1102.1215v1">Geodesics
|
||||
* on an ellipsoid of revolution</a>,
|
||||
* Feb. 2011;
|
||||
* preprint
|
||||
* <a href="http://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>.
|
||||
* <a href="https://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>.
|
||||
* .
|
||||
* See \ref geocentric for more information.
|
||||
*
|
||||
|
|
@ -79,8 +79,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @exception GeographicErr if \e a or (1 − \e f ) \e a is not
|
||||
* positive.
|
||||
**********************************************************************/
|
||||
|
|
@ -114,8 +113,7 @@ namespace NETGeographicLib
|
|||
* @param[out] Y geocentric coordinate (meters).
|
||||
* @param[out] Z geocentric coordinate (meters).
|
||||
*
|
||||
* \e lat should be in the range [−90°, 90°]; \e lon
|
||||
* should be in the range [−540°, 540°).
|
||||
* \e lat should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
void Forward(double lat, double lon, double h,
|
||||
[System::Runtime::InteropServices::Out] double% X,
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include <GeographicLib/Geodesic.hpp>
|
||||
#include <GeographicLib/GeodesicLine.hpp>
|
||||
#include "Geodesic.h"
|
||||
#include "GeodesicLine.h"
|
||||
#include "NETGeographicLib.h"
|
||||
|
|
@ -50,7 +51,7 @@ Geodesic::Geodesic()
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pGeodesic = new GeographicLib::Geodesic( GeographicLib::Geodesic::WGS84 );
|
||||
m_pGeodesic = new GeographicLib::Geodesic( GeographicLib::Geodesic::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
@ -293,7 +294,7 @@ void Geodesic::ArcDirect(double lat1, double lon1, double azi1, double a12,
|
|||
//*****************************************************************************
|
||||
double Geodesic::GenDirect(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
Geodesic::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -437,7 +438,7 @@ double Geodesic::Inverse(double lat1, double lon1, double lat2, double lon2,
|
|||
|
||||
//*****************************************************************************
|
||||
double Geodesic::GenInverse(double lat1, double lon1, double lat2, double lon2,
|
||||
NETGeographicLib::Mask outmask,
|
||||
Geodesic::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% s12,
|
||||
[System::Runtime::InteropServices::Out] double% azi1,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -473,6 +474,38 @@ GeodesicLine^ Geodesic::Line(double lat1, double lon1, double azi1,
|
|||
return gcnew GeodesicLine( this, lat1, lon1, azi1, caps );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine^ Geodesic::InverseLine(double lat1, double lon1, double lat2,
|
||||
double lon2, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLine(m_pGeodesic->InverseLine(lat1, lon1, lat2,
|
||||
lon2, static_cast<unsigned int>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine^ Geodesic::DirectLine(double lat1, double lon1, double azi1,
|
||||
double s12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLine(m_pGeodesic->DirectLine(lat1, lon1, azi1,
|
||||
s12, static_cast<unsigned int>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine^ Geodesic::ArcDirectLine(double lat1, double lon1, double azi1,
|
||||
double a12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLine(m_pGeodesic->ArcDirectLine(lat1, lon1, azi1,
|
||||
a12, static_cast<unsigned int>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine^ Geodesic::GenDirectLine(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLine(m_pGeodesic->GenDirectLine(lat1, lon1, azi1,
|
||||
arcmode, s12_a12, static_cast<unsigned int>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double Geodesic::MajorRadius::get() { return m_pGeodesic->MajorRadius(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
#include "NETGeographicLib.h"
|
||||
|
|
@ -24,7 +24,11 @@ namespace NETGeographicLib
|
|||
* the geodesic from point 1 to point 2 has azimuths \e azi1 and \e azi2 at
|
||||
* the two end points. (The azimuth is the heading measured clockwise from
|
||||
* north. \e azi2 is the "forward" azimuth, i.e., the heading that takes you
|
||||
* beyond point 2 not back to point 1.)
|
||||
* beyond point 2 not back to point 1.) In the figure below, latitude if
|
||||
* labeled φ, longitude λ (with λ<sub>12</sub> =
|
||||
* λ<sub>2</sub> − λ<sub>1</sub>), and azimuth α.
|
||||
*
|
||||
* <img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
|
||||
*
|
||||
* Given \e lat1, \e lon1, \e azi1, and \e s12, we can determine \e lat2, \e
|
||||
* lon2, and \e azi2. This is the \e direct geodesic problem and its
|
||||
|
|
@ -67,7 +71,6 @@ namespace NETGeographicLib
|
|||
* defined similarly (with the geodesics being parallel at point 2). On a
|
||||
* flat surface, we have \e M12 = \e M21 = 1. The quantity 1/\e M12 gives
|
||||
* the scale of the Cassini-Soldner projection.
|
||||
|
||||
* - <i>area</i>. The area between the geodesic from point 1 to point 2 and
|
||||
* the equation is represented by \e S12; it is the area, measured
|
||||
* counter-clockwise, of the geodesic quadrilateral with corners
|
||||
|
|
@ -96,29 +99,29 @@ namespace NETGeographicLib
|
|||
* (obviously) uniquely defined. However, in a few special cases there are
|
||||
* multiple azimuths which yield the same shortest distance. Here is a
|
||||
* catalog of those cases:
|
||||
* - \e lat1 = −\e lat2 (with neither at a pole). If \e azi1 = \e
|
||||
* azi2, the geodesic is unique. Otherwise there are two geodesics and the
|
||||
* second one is obtained by setting [\e azi1, \e azi2] = [\e azi2, \e
|
||||
* azi1], [\e M12, \e M21] = [\e M21, \e M12], \e S12 = −\e S12.
|
||||
* (This occurs when the longitude difference is near ±180° for
|
||||
* oblate ellipsoids.)
|
||||
* - \e lon2 = \e lon1 ± 180° (with neither at a pole). If \e
|
||||
* azi1 = 0° or ±180°, the geodesic is unique. Otherwise
|
||||
* - \e lat1 = −\e lat2 (with neither point at a pole). If \e azi1 =
|
||||
* \e azi2, the geodesic is unique. Otherwise there are two geodesics and
|
||||
* the second one is obtained by setting [\e azi1, \e azi2] → [\e
|
||||
* azi2, \e azi1], [\e M12, \e M21] → [\e M21, \e M12], \e S12 →
|
||||
* −\e S12. (This occurs when the longitude difference is near
|
||||
* ±180° for oblate ellipsoids.)
|
||||
* - \e lon2 = \e lon1 ± 180° (with neither point at a pole). If
|
||||
* \e azi1 = 0° or ±180°, the geodesic is unique. Otherwise
|
||||
* there are two geodesics and the second one is obtained by setting [\e
|
||||
* azi1, \e azi2] = [−\e azi1, −\e azi2], \e S12 = −\e
|
||||
* S12. (This occurs when the \e lat2 is near −\e lat1 for prolate
|
||||
* ellipsoids.)
|
||||
* azi1, \e azi2] → [−\e azi1, −\e azi2], \e S12 →
|
||||
* −\e S12. (This occurs when \e lat2 is near −\e lat1 for
|
||||
* prolate ellipsoids.)
|
||||
* - Points 1 and 2 at opposite poles. There are infinitely many geodesics
|
||||
* which can be generated by setting [\e azi1, \e azi2] = [\e azi1, \e
|
||||
* which can be generated by setting [\e azi1, \e azi2] → [\e azi1, \e
|
||||
* azi2] + [\e d, −\e d], for arbitrary \e d. (For spheres, this
|
||||
* prescription applies when points 1 and 2 are antipodal.)
|
||||
* - s12 = 0 (coincident points). There are infinitely many geodesics which
|
||||
* can be generated by setting [\e azi1, \e azi2] = [\e azi1, \e azi2] +
|
||||
* [\e d, \e d], for arbitrary \e d.
|
||||
* - \e s12 = 0 (coincident points). There are infinitely many geodesics
|
||||
* which can be generated by setting [\e azi1, \e azi2] →
|
||||
* [\e azi1, \e azi2] + [\e d, \e d], for arbitrary \e d.
|
||||
*
|
||||
* The calculations are accurate to better than 15 nm (15 nanometers) for the
|
||||
* WGS84 ellipsoid. See Sec. 9 of
|
||||
* <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
|
||||
* <a href="https://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
|
||||
* details. The algorithms used by this class are based on series expansions
|
||||
* using the flattening \e f as a small parameter. These are only accurate
|
||||
* for |<i>f</i>| < 0.02; however reasonably accurate results will be
|
||||
|
|
@ -137,12 +140,12 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The algorithms are described in
|
||||
* - C. F. F. Karney,
|
||||
* <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* Algorithms for geodesics</a>,
|
||||
* J. Geodesy <b>87</b>, 43--55 (2013);
|
||||
* DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* 10.1007/s00190-012-0578-z</a>;
|
||||
* addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
* addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
|
||||
* geod-addenda.html</a>.
|
||||
* .
|
||||
* For more information on geodesics see \ref geodesic.
|
||||
|
|
@ -173,7 +176,77 @@ namespace NETGeographicLib
|
|||
// Frees the unmanaged memory when this object is destroyed.
|
||||
!Geodesic();
|
||||
public:
|
||||
/** \name Constructor
|
||||
/**
|
||||
* Bit masks for what calculations to do. These masks do double duty.
|
||||
* They signify to the GeodesicLine::GeodesicLine constructor and to
|
||||
* Geodesic::Line what capabilities should be included in the GeodesicLine
|
||||
* object. They also specify which results to return in the general
|
||||
* routines Geodesic::GenDirect and Geodesic::GenInverse routines.
|
||||
* GeodesicLine::mask is a duplication of this enum.
|
||||
**********************************************************************/
|
||||
enum class mask {
|
||||
/**
|
||||
* No capabilities, no output.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
NONE = 0U,
|
||||
/**
|
||||
* Calculate latitude \e lat2. (It's not necessary to include this as a
|
||||
* capability to GeodesicLine because this is included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate longitude \e lon2.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONGITUDE = 1U<<8 | unsigned(captype::CAP_C3),
|
||||
/**
|
||||
* Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
|
||||
* include this as a capability to GeodesicLine because this is included
|
||||
* by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate distance \e s12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE = 1U<<10 | unsigned(captype::CAP_C1),
|
||||
/**
|
||||
* Allow distance \e s12 to be used as input in the direct geodesic
|
||||
* problem.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C1p),
|
||||
/**
|
||||
* Calculate reduced length \e m12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
|
||||
/**
|
||||
* Calculate geodesic scales \e M12 and \e M21.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
|
||||
/**
|
||||
* Calculate area \e S12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AREA = 1U<<14 | unsigned(captype::CAP_C4),
|
||||
/**
|
||||
* Unroll \e lon2 in the direct calculation.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONG_UNROLL = 1U<<15,
|
||||
/**
|
||||
* All capabilities, calculate everything. (LONG_UNROLL is not
|
||||
* included in this mask.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
ALL = unsigned(captype::OUT_ALL)| unsigned(captype::CAP_ALL),
|
||||
};
|
||||
/** \name Constructor
|
||||
**********************************************************************/
|
||||
///@{
|
||||
/**
|
||||
|
|
@ -181,8 +254,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @exception GeographicErr if \e a or (1 − \e f ) \e a is not
|
||||
* positive.
|
||||
**********************************************************************/
|
||||
|
|
@ -222,10 +294,9 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°). The values of
|
||||
* \e lon2 and \e azi2 returned are in the range [−180°,
|
||||
* 180°).
|
||||
* \e lat1 should be in the range [−90°, 90°]. The
|
||||
* values of \e lon2 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -316,10 +387,9 @@ namespace NETGeographicLib
|
|||
* (dimensionless).
|
||||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°). The values of
|
||||
* \e lon2 and \e azi2 returned are in the range [−180°,
|
||||
* 180°).
|
||||
* \e lat1 should be in the range [−90°, 90°]. The
|
||||
* values of \e lon2 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -415,7 +485,7 @@ namespace NETGeographicLib
|
|||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be negative.
|
||||
* @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
|
||||
* @param[in] outmask a bitor'ed combination of Geodesic::mask values
|
||||
* specifying which of the following parameters should be set.
|
||||
* @param[out] lat2 latitude of point 2 (degrees).
|
||||
* @param[out] lon2 longitude of point 2 (degrees).
|
||||
|
|
@ -429,28 +499,33 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* The NETGeographicLib::Mask values possible for \e outmask are
|
||||
* - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
|
||||
* The Geodesic::mask values possible for \e outmask are
|
||||
* - \e outmask |= Geodesic::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= Geodesic::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= Geodesic::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= Geodesic::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= Geodesic::REDUCEDLENGTH for the reduced length \e
|
||||
* m12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
|
||||
* - \e outmask |= Geodesic::GEODESICSCALE for the geodesic scales \e
|
||||
* M12 and \e M21;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
|
||||
* - \e outmask |= Geodesic::AREA for the area \e S12;
|
||||
* - \e outmask |= Geodesic::ALL for all of the above;
|
||||
* - \e outmask |= Geodesic::LONG_UNROLL to unroll \e lon2 instead of
|
||||
* wrapping it into the range [−180°, 180°).
|
||||
* .
|
||||
* The function value \e a12 is always computed and returned and this
|
||||
* equals \e s12_a12 is \e arcmode is true. If \e outmask includes
|
||||
* NETGeographicLib::Mask::DISTANCE and \e arcmode is false, then
|
||||
* \e s12 = \e s12_a12. It is not necessary to include
|
||||
* NETGeographicLib::Mask::DISTANCE_IN in \e outmask; this is
|
||||
* automatically included is \e arcmode is false.
|
||||
* Geodesic::DISTANCE and \e arcmode is false, then \e s12 = \e s12_a12.
|
||||
* It is not necessary to include Geodesic::DISTANCE_IN in \e outmask; this
|
||||
* is automatically included is \e arcmode is false.
|
||||
*
|
||||
* With the LONG_UNROLL bit set, the quantity \e lon2 − \e lon1
|
||||
* indicates how many times and in what sense the geodesic encircles
|
||||
* the ellipsoid.
|
||||
**********************************************************************/
|
||||
double GenDirect(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
Geodesic::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -482,10 +557,9 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* \e lat1 and \e lat2 should be in the range [−90°, 90°]; \e
|
||||
* lon1 and \e lon2 should be in the range [−540°, 540°).
|
||||
* The values of \e azi1 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
* \e lat1 and \e lat2 should be in the range [−90°,
|
||||
* 90°]. The values of \e azi1 and \e azi2 returned are in the
|
||||
* range [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -598,7 +672,7 @@ namespace NETGeographicLib
|
|||
* The arc length is always computed and returned as the function value.
|
||||
**********************************************************************/
|
||||
double GenInverse(double lat1, double lon1, double lat2, double lon2,
|
||||
NETGeographicLib::Mask outmask,
|
||||
Geodesic::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% s12,
|
||||
[System::Runtime::InteropServices::Out] double% azi1,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -624,8 +698,7 @@ namespace NETGeographicLib
|
|||
* GeodesicLine::Position.
|
||||
* @return a GeodesicLine object.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°).
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
*
|
||||
* The NETGeographicLib::Mask values are
|
||||
* - \e caps |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2; this is
|
||||
|
|
@ -651,6 +724,99 @@ namespace NETGeographicLib
|
|||
GeodesicLine^ Line(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps );
|
||||
|
||||
/**
|
||||
* Define a GeodesicLine in terms of the inverse geodesic problem.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] lat2 latitude of point 2 (degrees).
|
||||
* @param[in] lon2 longitude of point 2 (degrees).
|
||||
* @param[in] caps bitor'ed combination of Geodesic::mask values
|
||||
* specifying the capabilities the GeodesicLine object should possess,
|
||||
* i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
* @return a GeodesicLine object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLine to correspond to point 2
|
||||
* of the inverse geodesic problem.
|
||||
*
|
||||
* \e lat1 and \e lat2 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLine^ InverseLine(double lat1, double lon1, double lat2,
|
||||
double lon2, NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* Define a GeodesicLine in terms of the direct geodesic problem specified
|
||||
* in terms of distance.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] s12 distance between point 1 and point 2 (meters); it can be
|
||||
* negative.
|
||||
* @param[in] caps bitor'ed combination of Geodesic::mask values
|
||||
* specifying the capabilities the GeodesicLine object should possess,
|
||||
* i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
* @return a GeodesicLine object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLine to correspond to point 2
|
||||
* of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLine^ DirectLine(double lat1, double lon1, double azi1,
|
||||
double s12, NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* Define a GeodesicLine in terms of the direct geodesic problem specified
|
||||
* in terms of arc length.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] a12 arc length between point 1 and point 2 (degrees); it can
|
||||
* be negative.
|
||||
* @param[in] caps bitor'ed combination of Geodesic::mask values
|
||||
* specifying the capabilities the GeodesicLine object should possess,
|
||||
* i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
* @return a GeodesicLine object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLine to correspond to point 2
|
||||
* of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLine^ ArcDirectLine(double lat1, double lon1, double azi1,
|
||||
double a12, NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* Define a GeodesicLine in terms of the direct geodesic problem specified
|
||||
* in terms of either distance or arc length.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] arcmode boolean flag determining the meaning of the \e
|
||||
* s12_a12.
|
||||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be negative.
|
||||
* @param[in] caps bitor'ed combination of Geodesic::mask values
|
||||
* specifying the capabilities the GeodesicLine object should possess,
|
||||
* i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
* @return a GeodesicLine object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLine to correspond to point 2
|
||||
* of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLine^ GenDirectLine(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask caps);
|
||||
///@}
|
||||
|
||||
/** \name Inspector functions.
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GeodesicExact.hpp"
|
||||
#include "GeographicLib/GeodesicLineExact.hpp"
|
||||
#include "GeodesicExact.h"
|
||||
#include "GeodesicLineExact.h"
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ GeodesicExact::GeodesicExact()
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pGeodesicExact = new GeographicLib::GeodesicExact( GeographicLib::GeodesicExact::WGS84 );
|
||||
m_pGeodesicExact = new GeographicLib::GeodesicExact( GeographicLib::GeodesicExact::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc err )
|
||||
{
|
||||
|
|
@ -294,7 +295,7 @@ void GeodesicExact::ArcDirect(double lat1, double lon1, double azi1, double a12,
|
|||
//*****************************************************************************
|
||||
double GeodesicExact::GenDirect(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -439,7 +440,7 @@ double GeodesicExact::Inverse(double lat1, double lon1, double lat2, double lon2
|
|||
|
||||
//*****************************************************************************
|
||||
double GeodesicExact::GenInverse(double lat1, double lon1, double lat2, double lon2,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% s12,
|
||||
[System::Runtime::InteropServices::Out] double% azi1,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -476,6 +477,38 @@ GeodesicLineExact^ GeodesicExact::Line(double lat1, double lon1, double azi1,
|
|||
return gcnew GeodesicLineExact( this, lat1, lon1, azi1, caps );
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact^ GeodesicExact::InverseLine(double lat1, double lon1,
|
||||
double lat2, double lon2, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLineExact(m_pGeodesicExact->InverseLine(
|
||||
lat1, lon1, lat2, lon2, static_cast<unsigned>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact^ GeodesicExact::DirectLine(double lat1, double lon1,
|
||||
double azi1, double s12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLineExact(m_pGeodesicExact->DirectLine(
|
||||
lat1, lon1, azi1, s12, static_cast<unsigned>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact^ GeodesicExact::ArcDirectLine(double lat1, double lon1,
|
||||
double azi1, double a12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLineExact(m_pGeodesicExact->ArcDirectLine(
|
||||
lat1, lon1, azi1, a12, static_cast<unsigned>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact^ GeodesicExact::GenDirectLine(double lat1, double lon1,
|
||||
double azi1, bool arcmode, double s12_a12, NETGeographicLib::Mask caps)
|
||||
{
|
||||
return gcnew GeodesicLineExact(m_pGeodesicExact->GenDirectLine(
|
||||
lat1, lon1, azi1, arcmode, s12_a12, static_cast<unsigned>(caps)));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicExact::MajorRadius::get()
|
||||
{ return m_pGeodesicExact->MajorRadius(); }
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "NETGeographicLib.h"
|
||||
|
||||
|
|
@ -85,13 +85,97 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
public ref class GeodesicExact
|
||||
{
|
||||
private:
|
||||
private:
|
||||
enum class captype {
|
||||
CAP_NONE = 0U,
|
||||
CAP_E = 1U<<0,
|
||||
// Skip 1U<<1 for compatibility with Geodesic (not required)
|
||||
CAP_D = 1U<<2,
|
||||
CAP_H = 1U<<3,
|
||||
CAP_C4 = 1U<<4,
|
||||
CAP_ALL = 0x1FU,
|
||||
CAP_MASK = CAP_ALL,
|
||||
OUT_ALL = 0x7F80U,
|
||||
OUT_MASK = 0xFF80U, // Includes LONG_UNROLL
|
||||
};
|
||||
// pointer to the unmanaged GeographicLib::GeodesicExact.
|
||||
const GeographicLib::GeodesicExact* m_pGeodesicExact;
|
||||
|
||||
// the finalizer deletes the unmanaged memory.
|
||||
!GeodesicExact();
|
||||
public:
|
||||
/**
|
||||
* Bit masks for what calculations to do. These masks do double duty.
|
||||
* They signify to the GeodesicLineExact::GeodesicLineExact constructor and
|
||||
* to GeodesicExact::Line what capabilities should be included in the
|
||||
* GeodesicLineExact object. They also specify which results to return in
|
||||
* the general routines GeodesicExact::GenDirect and
|
||||
* GeodesicExact::GenInverse routines. GeodesicLineExact::mask is a
|
||||
* duplication of this enum.
|
||||
**********************************************************************/
|
||||
enum class mask {
|
||||
/**
|
||||
* No capabilities, no output.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
NONE = 0U,
|
||||
/**
|
||||
* Calculate latitude \e lat2. (It's not necessary to include this as a
|
||||
* capability to GeodesicLineExact because this is included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate longitude \e lon2.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONGITUDE = 1U<<8 | unsigned(captype::CAP_H),
|
||||
/**
|
||||
* Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
|
||||
* include this as a capability to GeodesicLineExact because this is
|
||||
* included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate distance \e s12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE = 1U<<10 | unsigned(captype::CAP_E),
|
||||
/**
|
||||
* Allow distance \e s12 to be used as input in the direct geodesic
|
||||
* problem.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_E),
|
||||
/**
|
||||
* Calculate reduced length \e m12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_D),
|
||||
/**
|
||||
* Calculate geodesic scales \e M12 and \e M21.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_D),
|
||||
/**
|
||||
* Calculate area \e S12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AREA = 1U<<14 | unsigned(captype::CAP_C4),
|
||||
/**
|
||||
* Unroll \e lon2 in the direct calculation.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONG_UNROLL = 1U<<15,
|
||||
/**
|
||||
* All capabilities, calculate everything. (LONG_UNROLL is not
|
||||
* included in this mask.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
ALL = unsigned(captype::OUT_ALL)| unsigned(captype::CAP_ALL),
|
||||
};
|
||||
|
||||
/** \name Constructor
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
|
@ -105,8 +189,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @exception GeographicErr if \e a or (1 − \e f ) \e a is not
|
||||
* positive.
|
||||
**********************************************************************/
|
||||
|
|
@ -142,10 +225,9 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°). The values of
|
||||
* \e lon2 and \e azi2 returned are in the range [−180°,
|
||||
* 180°).
|
||||
* \e lat1 should be in the range [−90°, 90°];. The
|
||||
* values of \e lon2 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -236,10 +318,9 @@ namespace NETGeographicLib
|
|||
* (dimensionless).
|
||||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°). The values of
|
||||
* \e lon2 and \e azi2 returned are in the range [−180°,
|
||||
* 180°).
|
||||
* \e lat1 should be in the range [−90°, 90°]. The
|
||||
* values of \e lon2 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -335,7 +416,7 @@ namespace NETGeographicLib
|
|||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be signed.
|
||||
* @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
|
||||
* @param[in] outmask a bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying which of the following parameters should be set.
|
||||
* @param[out] lat2 latitude of point 2 (degrees).
|
||||
* @param[out] lon2 longitude of point 2 (degrees).
|
||||
|
|
@ -349,26 +430,32 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* The NETGeographicLib::Mask values possible for \e outmask are
|
||||
* - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
|
||||
* The GeodesicExact::mask values possible for \e outmask are
|
||||
* - \e outmask |= GeodesicExact::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= GeodesicExact::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= GeodesicExact::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= GeodesicExact::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= GeodesicExact::REDUCEDLENGTH for the reduced length \e
|
||||
* m12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
|
||||
* - \e outmask |= GeodesicExact::GEODESICSCALE for the geodesic scales \e
|
||||
* M12 and \e M21;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
|
||||
* - \e outmask |= GeodesicExact::AREA for the area \e S12;
|
||||
* - \e outmask |= GeodesicExact::ALL for all of the above;
|
||||
* - \e outmask |= GeodesicExact::LONG_UNROLL to unroll \e lon2 instead of
|
||||
* wrapping it into the range [−180°, 180°).
|
||||
* .
|
||||
* The function value \e a12 is always computed and returned and this
|
||||
* equals \e s12_a12 is \e arcmode is true. If \e outmask includes
|
||||
* GeodesicExact::DISTANCE and \e arcmode is false, then \e s12 = \e
|
||||
* s12_a12. It is not necessary to include NETGeographicLib::Mask::DISTANCE_IN in
|
||||
* s12_a12. It is not necessary to include GeodesicExact::DISTANCE_IN in
|
||||
* \e outmask; this is automatically included is \e arcmode is false.
|
||||
*
|
||||
* With the LONG_UNROLL bit set, the quantity \e lon2 − \e lon1
|
||||
* indicates how many times and in what sense the geodesic encircles
|
||||
* the ellipsoid.
|
||||
**********************************************************************/
|
||||
double GenDirect(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12, NETGeographicLib::Mask outmask,
|
||||
bool arcmode, double s12_a12, GeodesicExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -400,10 +487,9 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* \e lat1 and \e lat2 should be in the range [−90°, 90°]; \e
|
||||
* lon1 and \e lon2 should be in the range [−540°, 540°).
|
||||
* The values of \e azi1 and \e azi2 returned are in the range
|
||||
* [−180°, 180°).
|
||||
* \e lat1 and \e lat2 should be in the range [−90°,
|
||||
* 90°]. The values of \e azi1 and \e azi2 returned are in the
|
||||
* range [−180°, 180°).
|
||||
*
|
||||
* If either point is at a pole, the azimuth is defined by keeping the
|
||||
* longitude fixed, writing \e lat = ±(90° − ε),
|
||||
|
|
@ -485,7 +571,7 @@ namespace NETGeographicLib
|
|||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] lat2 latitude of point 2 (degrees).
|
||||
* @param[in] lon2 longitude of point 2 (degrees).
|
||||
* @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
|
||||
* @param[in] outmask a bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying which of the following parameters should be set.
|
||||
* @param[out] s12 distance between point 1 and point 2 (meters).
|
||||
* @param[out] azi1 azimuth at point 1 (degrees).
|
||||
|
|
@ -498,20 +584,20 @@ namespace NETGeographicLib
|
|||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>).
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* The NETGeographicLib::Mask values possible for \e outmask are
|
||||
* - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
|
||||
* The GeodesicExact::mask values possible for \e outmask are
|
||||
* - \e outmask |= GeodesicExact::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= GeodesicExact::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= GeodesicExact::REDUCEDLENGTH for the reduced length \e
|
||||
* m12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
|
||||
* - \e outmask |= GeodesicExact::GEODESICSCALE for the geodesic scales \e
|
||||
* M12 and \e M21;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
|
||||
* - \e outmask |= GeodesicExact::AREA for the area \e S12;
|
||||
* - \e outmask |= GeodesicExact::ALL for all of the above.
|
||||
* .
|
||||
* The arc length is always computed and returned as the function value.
|
||||
**********************************************************************/
|
||||
double GenInverse(double lat1, double lon1, double lat2, double lon2,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% s12,
|
||||
[System::Runtime::InteropServices::Out] double% azi1,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -537,8 +623,7 @@ namespace NETGeographicLib
|
|||
* GeodesicLineExact::Position.
|
||||
* @return a GeodesicLineExact object.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°).
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
*
|
||||
* The GeodesicExact::mask values are
|
||||
* - \e caps |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2; this is
|
||||
|
|
@ -566,6 +651,98 @@ namespace NETGeographicLib
|
|||
GeodesicLineExact^ Line(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps );
|
||||
|
||||
/**
|
||||
* Define a GeodesicLineExact in terms of the inverse geodesic problem.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] lat2 latitude of point 2 (degrees).
|
||||
* @param[in] lon2 longitude of point 2 (degrees).
|
||||
* @param[in] caps bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying the capabilities the GeodesicLineExact object should
|
||||
* possess, i.e., which quantities can be returned in calls to
|
||||
* GeodesicLineExact::Position.
|
||||
* @return a GeodesicLineExact object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLineExact to correspond to
|
||||
* point 2 of the inverse geodesic problem.
|
||||
*
|
||||
* \e lat1 and \e lat2 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLineExact^ InverseLine(double lat1, double lon1, double lat2,
|
||||
double lon2, NETGeographicLib::Mask caps );
|
||||
|
||||
/**
|
||||
* Define a GeodesicLineExact in terms of the direct geodesic problem
|
||||
* specified in terms of distance.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] s12 distance between point 1 and point 2 (meters); it can be
|
||||
* negative.
|
||||
* @param[in] caps bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying the capabilities the GeodesicLineExact object should
|
||||
* possess, i.e., which quantities can be returned in calls to
|
||||
* GeodesicLineExact::Position.
|
||||
* @return a GeodesicLineExact object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLineExact to correspond to
|
||||
* point 2 of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLineExact^ DirectLine(double lat1, double lon1, double azi1,
|
||||
double s12, NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* Define a GeodesicLineExact in terms of the direct geodesic problem
|
||||
* specified in terms of arc length.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] a12 arc length between point 1 and point 2 (degrees); it can
|
||||
* be negative.
|
||||
* @param[in] caps bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying the capabilities the GeodesicLineExact object should
|
||||
* possess, i.e., which quantities can be returned in calls to
|
||||
* GeodesicLineExact::Position.
|
||||
* @return a GeodesicLineExact object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLineExact to correspond to
|
||||
* point 2 of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLineExact^ ArcDirectLine(double lat1, double lon1, double azi1,
|
||||
double a12, NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* Define a GeodesicLineExact in terms of the direct geodesic problem
|
||||
* specified in terms of either distance or arc length.
|
||||
*
|
||||
* @param[in] lat1 latitude of point 1 (degrees).
|
||||
* @param[in] lon1 longitude of point 1 (degrees).
|
||||
* @param[in] azi1 azimuth at point 1 (degrees).
|
||||
* @param[in] arcmode boolean flag determining the meaning of the \e
|
||||
* s12_a12.
|
||||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be negative.
|
||||
* @param[in] caps bitor'ed combination of GeodesicExact::mask values
|
||||
* specifying the capabilities the GeodesicLineExact object should
|
||||
* possess, i.e., which quantities can be returned in calls to
|
||||
* GeodesicLineExact::Position.
|
||||
* @return a GeodesicLineExact object.
|
||||
*
|
||||
* This function sets point 3 of the GeodesicLineExact to correspond to
|
||||
* point 2 of the direct geodesic problem.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
GeodesicLineExact^ GenDirectLine(double lat1, double lon1, double azi1,
|
||||
bool arcmode, double s12_a12, NETGeographicLib::Mask caps);
|
||||
///@}
|
||||
|
||||
/** \name Inspector functions.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GeodesicLine.hpp"
|
||||
|
|
@ -45,6 +45,19 @@ GeodesicLine::GeodesicLine( Geodesic^ g, double lat1, double lon1, double azi1,
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine::GeodesicLine(const GeographicLib::GeodesicLine& gl)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_pGeodesicLine = new GeographicLib::GeodesicLine(gl);
|
||||
}
|
||||
catch (std::bad_alloc)
|
||||
{
|
||||
throw gcnew GeographicErr(BADALLOC);
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLine::GeodesicLine(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps)
|
||||
|
|
@ -52,7 +65,7 @@ GeodesicLine::GeodesicLine(double lat1, double lon1, double azi1,
|
|||
try
|
||||
{
|
||||
m_pGeodesicLine = new GeographicLib::GeodesicLine(
|
||||
GeographicLib::Geodesic::WGS84, lat1, lon1, azi1,
|
||||
GeographicLib::Geodesic::WGS84(), lat1, lon1, azi1,
|
||||
static_cast<unsigned>(caps) );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
|
|
@ -291,7 +304,7 @@ void GeodesicLine::ArcPosition(double a12,
|
|||
|
||||
//*****************************************************************************
|
||||
double GeodesicLine::GenPosition(bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicLine::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -341,10 +354,52 @@ double GeodesicLine::MajorRadius::get()
|
|||
double GeodesicLine::Flattening::get()
|
||||
{ return m_pGeodesicLine->Flattening(); }
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLine::Distance::get()
|
||||
{ return m_pGeodesicLine->Distance(); }
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLine::Arc::get()
|
||||
{ return m_pGeodesicLine->Arc(); }
|
||||
|
||||
//*****************************************************************************
|
||||
NETGeographicLib::Mask GeodesicLine::Capabilities()
|
||||
{ return static_cast<NETGeographicLib::Mask>(m_pGeodesicLine->Capabilities()); }
|
||||
|
||||
//*****************************************************************************
|
||||
bool GeodesicLine::Capabilities(NETGeographicLib::Mask testcaps)
|
||||
bool GeodesicLine::Capabilities(GeodesicLine::mask testcaps)
|
||||
{ return m_pGeodesicLine->Capabilities( static_cast<unsigned>(testcaps) ); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLine::SetDistance(double s13)
|
||||
{ m_pGeodesicLine->SetDistance(s13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLine::SetArc(double a13)
|
||||
{ m_pGeodesicLine->SetArc(a13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLine::GenSetDistance(bool arcmode, double s13_a13)
|
||||
{ m_pGeodesicLine->GenSetDistance(arcmode, s13_a13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLine::AzimuthSinCos(double% sazi1, double% cazi1)
|
||||
{
|
||||
double x1, x2;
|
||||
m_pGeodesicLine->Azimuth(x1, x2);
|
||||
sazi1 = x1;
|
||||
cazi1 = x2;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLine::EquatorialAzimuthSinCos(double% sazi0, double% cazi0)
|
||||
{
|
||||
double x1, x2;
|
||||
m_pGeodesicLine->EquatorialAzimuth(x1, x2);
|
||||
sazi0 = x1;
|
||||
cazi0 = x2;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLine::GenDistance(bool arcmode)
|
||||
{ return m_pGeodesicLine->GenDistance(arcmode); }
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "NETGeographicLib.h"
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The calculations are accurate to better than 15 nm (15 nanometers). See
|
||||
* Sec. 9 of
|
||||
* <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
|
||||
* <a href="https://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
|
||||
* details. The algorithms used by this class are based on series expansions
|
||||
* using the flattening \e f as a small parameter. These are only accurate
|
||||
* for |<i>f</i>| < 0.02; however reasonably accurate results will be
|
||||
|
|
@ -39,12 +39,12 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The algorithms are described in
|
||||
* - C. F. F. Karney,
|
||||
* <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* Algorithms for geodesics</a>,
|
||||
* J. Geodesy <b>87</b>, 43--55 (2013);
|
||||
* DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* 10.1007/s00190-012-0578-z</a>;
|
||||
* addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
* addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
|
||||
* geod-addenda.html</a>.
|
||||
* .
|
||||
* For more information on geodesics see \ref geodesic.
|
||||
|
|
@ -61,22 +61,95 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The following functions are implemented as properties:
|
||||
* Latitude, Longitude, Azimuth, EquatorialAzimuth, EquatorialArc,
|
||||
* MajorRadius, and Flattening.
|
||||
* MajorRadius, Distance, Arc, and Flattening.
|
||||
*
|
||||
* The constructors, Capabilities, and GenPosition functions accept the
|
||||
* "capabilities mask" as a NETGeographicLib::Mask rather than an
|
||||
* unsigned. The Capabilities function returns a NETGeographicLib::Mask
|
||||
* rather than an unsigned.
|
||||
*
|
||||
* The overloaded Azimuth and EquatorialAzimuth functions that return
|
||||
* the sin and cosine terms have been renamed AzimuthSinCos and
|
||||
* EquatorialAzimuthSinCos, repectively.
|
||||
**********************************************************************/
|
||||
public ref class GeodesicLine
|
||||
{
|
||||
private:
|
||||
// pointer to the unmanaged GeographicLib::GeodesicLine.
|
||||
const GeographicLib::GeodesicLine* m_pGeodesicLine;
|
||||
GeographicLib::GeodesicLine* m_pGeodesicLine;
|
||||
|
||||
// The finalizer frees the unmanaged memory when this object is destroyed.
|
||||
!GeodesicLine(void);
|
||||
public:
|
||||
|
||||
/**
|
||||
* Bit masks for what calculations to do. They signify to the
|
||||
* GeodesicLine::GeodesicLine constructor and to Geodesic::Line what
|
||||
* capabilities should be included in the GeodesicLine object. This is
|
||||
* merely a duplication of Geodesic::mask.
|
||||
**********************************************************************/
|
||||
enum class mask {
|
||||
/**
|
||||
* No capabilities, no output.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
NONE = 0U,
|
||||
/**
|
||||
* Calculate latitude \e lat2. (It's not necessary to include this as a
|
||||
* capability to GeodesicLine because this is included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate longitude \e lon2.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONGITUDE = 1U<<8 | unsigned(captype::CAP_C3),
|
||||
/**
|
||||
* Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
|
||||
* include this as a capability to GeodesicLine because this is included
|
||||
* by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate distance \e s12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE = 1U<<10 | unsigned(captype::CAP_C1),
|
||||
/**
|
||||
* Allow distance \e s12 to be used as input in the direct geodesic
|
||||
* problem.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C1p),
|
||||
/**
|
||||
* Calculate reduced length \e m12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
|
||||
/**
|
||||
* Calculate geodesic scales \e M12 and \e M21.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
|
||||
/**
|
||||
* Calculate area \e S12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AREA = 1U<<14 | unsigned(captype::CAP_C4),
|
||||
/**
|
||||
* Unroll \e lon2 in the direct calculation.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONG_UNROLL = 1U<<15,
|
||||
/**
|
||||
* All capabilities, calculate everything. (LONG_UNROLL is not
|
||||
* included in this mask.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
ALL = unsigned(captype::OUT_ALL)| unsigned(captype::CAP_ALL),
|
||||
};
|
||||
/** \name Constructors
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
|
@ -95,8 +168,7 @@ namespace NETGeographicLib
|
|||
* i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°).
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
*
|
||||
* The NETGeographicLib::Mask values are
|
||||
* - \e caps |= GeodesicLine::LATITUDE for the latitude \e lat2; this is
|
||||
|
|
@ -128,6 +200,12 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
GeodesicLine(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* A constructoe that accepts a reference to an unmanages GeodesicLin.
|
||||
* FOR INTERNAL USE ONLY
|
||||
**********************************************************************/
|
||||
GeodesicLine(const GeographicLib::GeodesicLine& gl);
|
||||
///@}
|
||||
|
||||
/**
|
||||
|
|
@ -358,49 +436,55 @@ namespace NETGeographicLib
|
|||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be negative.
|
||||
* @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
|
||||
* @param[in] outmask a bitor'ed combination of GeodesicLine::mask values
|
||||
* specifying which of the following parameters should be set.
|
||||
* @param[out] lat2 latitude of point 2 (degrees).
|
||||
* @param[out] lon2 longitude of point 2 (degrees); requires that the
|
||||
* GeodesicLine object was constructed with \e caps |=
|
||||
* NETGeographicLib::Mask::LONGITUDE.
|
||||
* GeodesicLine::LONGITUDE.
|
||||
* @param[out] azi2 (forward) azimuth at point 2 (degrees).
|
||||
* @param[out] s12 distance between point 1 and point 2 (meters); requires
|
||||
* that the GeodesicLine object was constructed with \e caps |=
|
||||
* NETGeographicLib::Mask::DISTANCE.
|
||||
* GeodesicLine::DISTANCE.
|
||||
* @param[out] m12 reduced length of geodesic (meters); requires that the
|
||||
* GeodesicLine object was constructed with \e caps |=
|
||||
* NETGeographicLib::Mask::REDUCEDLENGTH.
|
||||
* GeodesicLine::REDUCEDLENGTH.
|
||||
* @param[out] M12 geodesic scale of point 2 relative to point 1
|
||||
* (dimensionless); requires that the GeodesicLine object was constructed
|
||||
* with \e caps |= NETGeographicLib::Mask::GEODESICSCALE.
|
||||
* with \e caps |= GeodesicLine::GEODESICSCALE.
|
||||
* @param[out] M21 geodesic scale of point 1 relative to point 2
|
||||
* (dimensionless); requires that the GeodesicLine object was constructed
|
||||
* with \e caps |= NETGeographicLib::Mask::GEODESICSCALE.
|
||||
* with \e caps |= GeodesicLine::GEODESICSCALE.
|
||||
* @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires
|
||||
* that the GeodesicLine object was constructed with \e caps |=
|
||||
* NETGeographicLib::Mask::AREA.
|
||||
* GeodesicLine::AREA.
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* The GeodesicLine::mask values possible for \e outmask are
|
||||
* - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
|
||||
* - \e outmask |= GeodesicLine::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= GeodesicLine::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= GeodesicLine::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= GeodesicLine::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= GeodesicLine::REDUCEDLENGTH for the reduced length \e
|
||||
* m12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
|
||||
* - \e outmask |= GeodesicLine::GEODESICSCALE for the geodesic scales \e
|
||||
* M12 and \e M21;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
|
||||
* - \e outmask |= GeodesicLine::AREA for the area \e S12;
|
||||
* - \e outmask |= GeodesicLine::ALL for all of the above;
|
||||
* - \e outmask |= GeodesicLine::LONG_UNROLL to unroll \e lon2 instead of
|
||||
* wrapping it into the range [−180°, 180°).
|
||||
* .
|
||||
* Requesting a value which the GeodesicLine object is not capable of
|
||||
* computing is not an error; the corresponding argument will not be
|
||||
* altered. Note, however, that the arc length is always computed and
|
||||
* returned as the function value.
|
||||
*
|
||||
* With the LONG_UNROLL bit set, the quantity \e lon2 − \e lon1
|
||||
* indicates how many times and in what sense the geodesic encircles
|
||||
* the ellipsoid.
|
||||
**********************************************************************/
|
||||
double GenPosition(bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicLine::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -412,6 +496,77 @@ namespace NETGeographicLib
|
|||
|
||||
///@}
|
||||
|
||||
/** \name Setting point 3
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of distance.
|
||||
*
|
||||
* @param[in] s13 the distance from point 1 to point 3 (meters); it
|
||||
* can be negative.
|
||||
*
|
||||
* This is only useful if the GeodesicLine object has been constructed
|
||||
* with \e caps |= GeodesicLine::DISTANCE_IN.
|
||||
**********************************************************************/
|
||||
void SetDistance(double s13);
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of arc length.
|
||||
*
|
||||
* @param[in] a13 the arc length from point 1 to point 3 (degrees); it
|
||||
* can be negative.
|
||||
*
|
||||
* The distance \e s13 is only set if the GeodesicLine object has been
|
||||
* constructed with \e caps |= GeodesicLine::DISTANCE.
|
||||
**********************************************************************/
|
||||
void SetArc(double a13);
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of either distance or arc length.
|
||||
*
|
||||
* @param[in] arcmode boolean flag determining the meaning of the second
|
||||
* parameter; if \e arcmode is false, then the GeodesicLine object must
|
||||
* have been constructed with \e caps |= GeodesicLine::DISTANCE_IN.
|
||||
* @param[in] s13_a13 if \e arcmode is false, this is the distance from
|
||||
* point 1 to point 3 (meters); otherwise it is the arc length from
|
||||
* point 1 to point 3 (degrees); it can be negative.
|
||||
**********************************************************************/
|
||||
void GenSetDistance(bool arcmode, double s13_a13);
|
||||
///@}
|
||||
|
||||
/** \name Trigonometric accessor functions
|
||||
**********************************************************************/
|
||||
///@{
|
||||
/**
|
||||
* The sine and cosine of \e azi1.
|
||||
*
|
||||
* @param[out] sazi1 the sine of \e azi1.
|
||||
* @param[out] cazi1 the cosine of \e azi1.
|
||||
**********************************************************************/
|
||||
void AzimuthSinCos([System::Runtime::InteropServices::Out] double% sazi1,
|
||||
[System::Runtime::InteropServices::Out] double% cazi1);
|
||||
|
||||
/**
|
||||
* The sine and cosine of \e azi0.
|
||||
*
|
||||
* @param[out] sazi0 the sine of \e azi0.
|
||||
* @param[out] cazi0 the cosine of \e azi0.
|
||||
**********************************************************************/
|
||||
void EquatorialAzimuthSinCos(
|
||||
[System::Runtime::InteropServices::Out] double% sazi0,
|
||||
[System::Runtime::InteropServices::Out] double% cazi0);
|
||||
|
||||
/**
|
||||
* The distance or arc length to point 3.
|
||||
*
|
||||
* @param[in] arcmode boolean flag determining the meaning of returned
|
||||
* value.
|
||||
* @return \e s13 if \e arcmode is false; \e a13 if \e arcmode is true.
|
||||
**********************************************************************/
|
||||
double GenDistance(bool arcmode);
|
||||
///@}
|
||||
|
||||
/** \name Inspector functions
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
|
@ -455,6 +610,16 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
property double Flattening { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e s13, the distance to point 3 (meters).
|
||||
**********************************************************************/
|
||||
property double Distance { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e a13, the arc length to point 3 (degrees).
|
||||
**********************************************************************/
|
||||
property double Arc { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e caps the computational capabilities that this object was
|
||||
* constructed with. LATITUDE and AZIMUTH are always included.
|
||||
|
|
@ -465,7 +630,7 @@ namespace NETGeographicLib
|
|||
* @param[in] testcaps a set of bitor'ed GeodesicLine::mask values.
|
||||
* @return true if the GeodesicLine object has all these capabilities.
|
||||
**********************************************************************/
|
||||
bool Capabilities(NETGeographicLib::Mask testcaps);
|
||||
bool Capabilities(GeodesicLine::mask testcaps);
|
||||
///@}
|
||||
};
|
||||
} // namespace NETGeographicLib
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GeodesicLineExact.hpp"
|
||||
|
|
@ -45,6 +45,20 @@ GeodesicLineExact::GeodesicLineExact(GeodesicExact^ g, double lat1,
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact::GeodesicLineExact(
|
||||
const GeographicLib::GeodesicLineExact& gle)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_pGeodesicLineExact = new GeographicLib::GeodesicLineExact(gle);
|
||||
}
|
||||
catch (std::bad_alloc)
|
||||
{
|
||||
throw gcnew GeographicErr(BADALLOC);
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
GeodesicLineExact::GeodesicLineExact(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps)
|
||||
|
|
@ -52,7 +66,7 @@ GeodesicLineExact::GeodesicLineExact(double lat1, double lon1, double azi1,
|
|||
try
|
||||
{
|
||||
m_pGeodesicLineExact = new GeographicLib::GeodesicLineExact(
|
||||
GeographicLib::GeodesicExact::WGS84, lat1, lon1, azi1,
|
||||
GeographicLib::GeodesicExact::WGS84(), lat1, lon1, azi1,
|
||||
static_cast<unsigned>(caps) );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
|
|
@ -292,7 +306,7 @@ void GeodesicLineExact::ArcPosition(double a12,
|
|||
|
||||
//*****************************************************************************
|
||||
double GeodesicLineExact::GenPosition(bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicLineExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -345,6 +359,14 @@ double GeodesicLineExact::MajorRadius::get()
|
|||
double GeodesicLineExact::Flattening::get()
|
||||
{ return m_pGeodesicLineExact->Flattening(); }
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLineExact::Distance::get()
|
||||
{ return m_pGeodesicLineExact->Distance(); }
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLineExact::Arc::get()
|
||||
{ return m_pGeodesicLineExact->Arc(); }
|
||||
|
||||
//*****************************************************************************
|
||||
NETGeographicLib::Mask GeodesicLineExact::Capabilities()
|
||||
{ return static_cast<NETGeographicLib::Mask>(m_pGeodesicLineExact->Capabilities()); }
|
||||
|
|
@ -352,3 +374,37 @@ NETGeographicLib::Mask GeodesicLineExact::Capabilities()
|
|||
//*****************************************************************************
|
||||
bool GeodesicLineExact::Capabilities(NETGeographicLib::Mask testcaps)
|
||||
{ return m_pGeodesicLineExact->Capabilities(static_cast<unsigned>(testcaps)); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLineExact::SetDistance(double s13)
|
||||
{ m_pGeodesicLineExact->SetDistance(s13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLineExact::SetArc(double a13)
|
||||
{ m_pGeodesicLineExact->SetArc(a13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLineExact::GenSetDistance(bool arcmode, double s13_a13)
|
||||
{ m_pGeodesicLineExact->GenSetDistance(arcmode, s13_a13); }
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLineExact::AzimuthSinCos(double% sazi1, double% cazi1)
|
||||
{
|
||||
double x1, x2;
|
||||
m_pGeodesicLineExact->Azimuth(x1, x2);
|
||||
sazi1 = x1;
|
||||
cazi1 = x2;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void GeodesicLineExact::EquatorialAzimuthSinCos(double% sazi0, double% cazi0)
|
||||
{
|
||||
double x1, x2;
|
||||
m_pGeodesicLineExact->EquatorialAzimuth(x1, x2);
|
||||
sazi0 = x1;
|
||||
cazi0 = x2;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double GeodesicLineExact::GenDistance(bool arcmode)
|
||||
{ return m_pGeodesicLineExact->GenDistance(arcmode); }
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "NETGeographicLib.h"
|
||||
|
||||
|
|
@ -36,22 +36,109 @@ namespace NETGeographicLib
|
|||
*
|
||||
* The following functions are implemented as properties:
|
||||
* Latitude, Longitude, Azimuth, EquatorialAzimuth, EquatorialArc,
|
||||
* MajorRadius, and Flattening.
|
||||
* MajorRadius, Distance, Arc, and Flattening.
|
||||
*
|
||||
* The constructors, GenPosition, and Capabilities functions accept the
|
||||
* "capabilities mask" as a NETGeographicLib::Mask rather than an
|
||||
* unsigned. The Capabilities function returns a NETGeographicLib::Mask
|
||||
* rather than an unsigned.
|
||||
*
|
||||
* The overloaded Azimuth and EquatorialAzimuth functions that return
|
||||
* the sin and cosine terms have been renamed AzimuthSinCos and
|
||||
* EquatorialAzimuthSinCos, repectively.
|
||||
**********************************************************************/
|
||||
public ref class GeodesicLineExact
|
||||
{
|
||||
private:
|
||||
private:
|
||||
enum class captype {
|
||||
CAP_NONE = 0U,
|
||||
CAP_E = 1U<<0,
|
||||
// Skip 1U<<1 for compatibility with Geodesic (not required)
|
||||
CAP_D = 1U<<2,
|
||||
CAP_H = 1U<<3,
|
||||
CAP_C4 = 1U<<4,
|
||||
CAP_ALL = 0x1FU,
|
||||
CAP_MASK = CAP_ALL,
|
||||
OUT_ALL = 0x7F80U,
|
||||
OUT_MASK = 0xFF80U, // Includes LONG_UNROLL
|
||||
};
|
||||
// a pointer to the GeographicLib::GeodesicLineExact.
|
||||
const GeographicLib::GeodesicLineExact* m_pGeodesicLineExact;
|
||||
GeographicLib::GeodesicLineExact* m_pGeodesicLineExact;
|
||||
|
||||
// the finalizer frees the unmanaged memory when the object is destroyed.
|
||||
!GeodesicLineExact(void);
|
||||
public:
|
||||
/**
|
||||
* Bit masks for what calculations to do. These masks do double duty.
|
||||
* They signify to the GeodesicLineExact::GeodesicLineExact constructor and
|
||||
* to GeodesicExact::Line what capabilities should be included in the
|
||||
* GeodesicLineExact object. They also specify which results to return in
|
||||
* the general routines GeodesicExact::GenDirect and
|
||||
* GeodesicExact::GenInverse routines. GeodesicLineExact::mask is a
|
||||
* duplication of this enum.
|
||||
**********************************************************************/
|
||||
enum class mask {
|
||||
/**
|
||||
* No capabilities, no output.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
NONE = 0U,
|
||||
/**
|
||||
* Calculate latitude \e lat2. (It's not necessary to include this as a
|
||||
* capability to GeodesicLineExact because this is included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate longitude \e lon2.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONGITUDE = 1U<<8 | unsigned(captype::CAP_H),
|
||||
/**
|
||||
* Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
|
||||
* include this as a capability to GeodesicLineExact because this is
|
||||
* included by default.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
|
||||
/**
|
||||
* Calculate distance \e s12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE = 1U<<10 | unsigned(captype::CAP_E),
|
||||
/**
|
||||
* Allow distance \e s12 to be used as input in the direct geodesic
|
||||
* problem.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_E),
|
||||
/**
|
||||
* Calculate reduced length \e m12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_D),
|
||||
/**
|
||||
* Calculate geodesic scales \e M12 and \e M21.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_D),
|
||||
/**
|
||||
* Calculate area \e S12.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
AREA = 1U<<14 | unsigned(captype::CAP_C4),
|
||||
/**
|
||||
* Unroll \e lon2 in the direct calculation.
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
LONG_UNROLL = 1U<<15,
|
||||
/**
|
||||
* All capabilities, calculate everything. (LONG_UNROLL is not
|
||||
* included in this mask.)
|
||||
* @hideinitializer
|
||||
**********************************************************************/
|
||||
ALL = unsigned(captype::OUT_ALL)| unsigned(captype::CAP_ALL),
|
||||
};
|
||||
|
||||
/** \name Constructors
|
||||
**********************************************************************/
|
||||
|
|
@ -71,8 +158,7 @@ namespace NETGeographicLib
|
|||
* possess, i.e., which quantities can be returned in calls to
|
||||
* GeodesicLine::Position.
|
||||
*
|
||||
* \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e
|
||||
* azi1 should be in the range [−540°, 540°).
|
||||
* \e lat1 should be in the range [−90°, 90°].
|
||||
*
|
||||
* The NETGeographicLib::Mask values are
|
||||
* - \e caps |= GeodesicLineExact::LATITUDE for the latitude \e lat2; this
|
||||
|
|
@ -105,6 +191,13 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
GeodesicLineExact(double lat1, double lon1, double azi1,
|
||||
NETGeographicLib::Mask caps);
|
||||
|
||||
/**
|
||||
* This constructor accepts a reference to an unmanaged
|
||||
* GeodesicLineExact.
|
||||
* FOR INTERNAL USE ONLY.
|
||||
**********************************************************************/
|
||||
GeodesicLineExact(const GeographicLib::GeodesicLineExact& gle);
|
||||
///@}
|
||||
|
||||
/**
|
||||
|
|
@ -335,7 +428,7 @@ namespace NETGeographicLib
|
|||
* @param[in] s12_a12 if \e arcmode is false, this is the distance between
|
||||
* point 1 and point 2 (meters); otherwise it is the arc length between
|
||||
* point 1 and point 2 (degrees); it can be signed.
|
||||
* @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask
|
||||
* @param[in] outmask a bitor'ed combination of GeodesicLineExact::mask
|
||||
* values specifying which of the following parameters should be set.
|
||||
* @param[out] lat2 latitude of point 2 (degrees).
|
||||
* @param[out] lon2 longitude of point 2 (degrees); requires that the
|
||||
|
|
@ -359,25 +452,31 @@ namespace NETGeographicLib
|
|||
* GeodesicLineExact::AREA.
|
||||
* @return \e a12 arc length of between point 1 and point 2 (degrees).
|
||||
*
|
||||
* The NETGeographicLib::Mask values possible for \e outmask are
|
||||
* - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length
|
||||
* The GeodesicLineExact::mask values possible for \e outmask are
|
||||
* - \e outmask |= GeodesicLineExact::LATITUDE for the latitude \e lat2;
|
||||
* - \e outmask |= GeodesicLineExact::LONGITUDE for the latitude \e lon2;
|
||||
* - \e outmask |= GeodesicLineExact::AZIMUTH for the latitude \e azi2;
|
||||
* - \e outmask |= GeodesicLineExact::DISTANCE for the distance \e s12;
|
||||
* - \e outmask |= GeodesicLineExact::REDUCEDLENGTH for the reduced length
|
||||
* \e m12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales
|
||||
* - \e outmask |= GeodesicLineExact::GEODESICSCALE for the geodesic scales
|
||||
* \e M12 and \e M21;
|
||||
* - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
|
||||
* - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
|
||||
* - \e outmask |= GeodesicLineExact::AREA for the area \e S12;
|
||||
* - \e outmask |= GeodesicLineExact::ALL for all of the above;
|
||||
* - \e outmask |= GeodesicLineExact::LONG_UNROLL to unroll \e lon2 instead
|
||||
* of wrapping it into the range [−180°, 180°).
|
||||
* .
|
||||
* Requesting a value which the GeodesicLineExact object is not capable of
|
||||
* computing is not an error; the corresponding argument will not be
|
||||
* altered. Note, however, that the arc length is always computed and
|
||||
* returned as the function value.
|
||||
*
|
||||
* With the LONG_UNROLL bit set, the quantity \e lon2 − \e lon1
|
||||
* indicates how many times and in what sense the geodesic encircles
|
||||
* the ellipsoid.
|
||||
**********************************************************************/
|
||||
double GenPosition(bool arcmode, double s12_a12,
|
||||
NETGeographicLib::Mask outmask,
|
||||
GeodesicLineExact::mask outmask,
|
||||
[System::Runtime::InteropServices::Out] double% lat2,
|
||||
[System::Runtime::InteropServices::Out] double% lon2,
|
||||
[System::Runtime::InteropServices::Out] double% azi2,
|
||||
|
|
@ -389,6 +488,79 @@ namespace NETGeographicLib
|
|||
|
||||
///@}
|
||||
|
||||
/** \name Setting point 3
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of distance.
|
||||
*
|
||||
* @param[in] s13 the distance from point 1 to point 3 (meters); it
|
||||
* can be negative.
|
||||
*
|
||||
* This is only useful if the GeodesicLineExact object has been constructed
|
||||
* with \e caps |= GeodesicLineExact::DISTANCE_IN.
|
||||
**********************************************************************/
|
||||
void SetDistance(double s13);
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of arc length.
|
||||
*
|
||||
* @param[in] a13 the arc length from point 1 to point 3 (degrees); it
|
||||
* can be negative.
|
||||
*
|
||||
* The distance \e s13 is only set if the GeodesicLineExact object has been
|
||||
* constructed with \e caps |= GeodesicLineExact::DISTANCE.
|
||||
**********************************************************************/
|
||||
void SetArc(double a13);
|
||||
|
||||
/**
|
||||
* Specify position of point 3 in terms of either distance or arc length.
|
||||
*
|
||||
* @param[in] arcmode boolean flag determining the meaning of the second
|
||||
* parameter; if \e arcmode is false, then the GeodesicLineExact object
|
||||
* must have been constructed with \e caps |=
|
||||
* GeodesicLineExact::DISTANCE_IN.
|
||||
* @param[in] s13_a13 if \e arcmode is false, this is the distance from
|
||||
* point 1 to point 3 (meters); otherwise it is the arc length from
|
||||
* point 1 to point 3 (degrees); it can be negative.
|
||||
**********************************************************************/
|
||||
void GenSetDistance(bool arcmode, double s13_a13);
|
||||
|
||||
/**
|
||||
* The distance or arc length to point 3.
|
||||
*
|
||||
* @param[in] arcmode boolean flag determining the meaning of returned
|
||||
* value.
|
||||
* @return \e s13 if \e arcmode is false; \e a13 if \e arcmode is true.
|
||||
**********************************************************************/
|
||||
double GenDistance(bool arcmode);
|
||||
///@}
|
||||
|
||||
/** \name Trigonometric accessor functions
|
||||
**********************************************************************/
|
||||
///@{
|
||||
/**
|
||||
* The sine and cosine of \e azi1.
|
||||
*
|
||||
* @param[out] sazi1 the sine of \e azi1.
|
||||
* @param[out] cazi1 the cosine of \e azi1.
|
||||
**********************************************************************/
|
||||
void AzimuthSinCos(
|
||||
[System::Runtime::InteropServices::Out] double% sazi1,
|
||||
[System::Runtime::InteropServices::Out] double% cazi1);
|
||||
|
||||
/**
|
||||
* The sine and cosine of \e azi0.
|
||||
*
|
||||
* @param[out] sazi0 the sine of \e azi0.
|
||||
* @param[out] cazi0 the cosine of \e azi0.
|
||||
**********************************************************************/
|
||||
void EquatorialAzimuthSinCos(
|
||||
[System::Runtime::InteropServices::Out] double% sazi0,
|
||||
[System::Runtime::InteropServices::Out] double% cazi0);
|
||||
///@}
|
||||
|
||||
/** \name Inspector functions
|
||||
**********************************************************************/
|
||||
///@{
|
||||
|
|
@ -432,6 +604,16 @@ namespace NETGeographicLib
|
|||
**********************************************************************/
|
||||
property double Flattening { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e s13, the distance to point 3 (meters).
|
||||
**********************************************************************/
|
||||
property double Distance { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e a13, the arc length to point 3 (degrees).
|
||||
**********************************************************************/
|
||||
property double Arc { double get(); }
|
||||
|
||||
/**
|
||||
* @return \e caps the computational capabilities that this object was
|
||||
* constructed with. LATITUDE and AZIMUTH are always included.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Geohash.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -16,8 +16,8 @@ namespace NETGeographicLib
|
|||
* \brief .NET wrapper for GeographicLib::Geohash.
|
||||
*
|
||||
* Geohashes are described in
|
||||
* - http://en.wikipedia.org/wiki/Geohash
|
||||
* - http://geohash.org/
|
||||
* - https://en.wikipedia.org/wiki/Geohash
|
||||
* - http://geohash.org/ (this link is broken as of 2012-12-11)
|
||||
* .
|
||||
* They provide a compact string representation of a particular geographic
|
||||
* location (expressed as latitude and longitude), with the property that if
|
||||
|
|
@ -45,10 +45,8 @@ namespace NETGeographicLib
|
|||
* @param[in] lon longitude of point (degrees).
|
||||
* @param[in] len the length of the resulting geohash.
|
||||
* @param[out] geohash the geohash.
|
||||
* @exception GeographicErr if \e la is not in [−90°,
|
||||
* @exception GeographicErr if \e lat is not in [−90°,
|
||||
* 90°].
|
||||
* @exception GeographicErr if \e lon is not in [−540°,
|
||||
* 540°).
|
||||
* @exception std::bad_alloc if memory for \e geohash can't be allocated.
|
||||
*
|
||||
* Internally, \e len is first put in the range [0, 18].
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Geoid.hpp"
|
||||
|
|
@ -92,25 +92,6 @@ double Geoid::Height(double lat, double lon)
|
|||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double Geoid::Height(double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% gradn,
|
||||
[System::Runtime::InteropServices::Out] double% grade)
|
||||
{
|
||||
try
|
||||
{
|
||||
double lgradn, lgrade;
|
||||
double out = m_pGeoid->operator()( lat, lon, lgradn, lgrade );
|
||||
gradn = lgradn;
|
||||
grade = lgrade;
|
||||
return out;
|
||||
}
|
||||
catch ( const std::exception& err )
|
||||
{
|
||||
throw gcnew GeographicErr( err.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double Geoid::ConvertHeight(double lat, double lon, double h,
|
||||
ConvertFlag d)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -32,18 +32,16 @@ namespace NETGeographicLib
|
|||
* this class evaluates the height by interpolation into a grid of
|
||||
* precomputed values.
|
||||
*
|
||||
* The geoid height, \e N, can be used to convert a height above the
|
||||
* ellipsoid, \e h, to the corresponding height above the geoid (roughly the
|
||||
* height above mean sea level), \e H, using the relations
|
||||
*
|
||||
* \e h = \e N + \e H;
|
||||
* \e H = −\e N + \e h.
|
||||
*
|
||||
* See \ref geoid for details of how to install the data sets, the data
|
||||
* format, estimates of the interpolation errors, and how to use caching.
|
||||
*
|
||||
* In addition to returning the geoid height, the gradient of the geoid can
|
||||
* be calculated. The gradient is defined as the rate of change of the geoid
|
||||
* as a function of position on the ellipsoid. This uses the parameters for
|
||||
* the WGS84 ellipsoid. The gradient defined in terms of the interpolated
|
||||
* heights. As a result of the way that the geoid data is stored, the
|
||||
* calculation of gradients can result in large quantization errors. This is
|
||||
* particularly acute for fine grids, at high latitudes, and for the easterly
|
||||
* gradient.
|
||||
*
|
||||
* This class is typically \e not thread safe in that a single instantiation
|
||||
* cannot be safely used by multiple threads because of the way the object
|
||||
* reads the data set and because it maintains a single-cell cache. If
|
||||
|
|
@ -149,8 +147,7 @@ namespace NETGeographicLib
|
|||
* parallels \e south and \e north and the meridians \e west and \e east.
|
||||
* \e east is always interpreted as being east of \e west, if necessary by
|
||||
* adding 360° to its value. \e south and \e north should be in
|
||||
* the range [−90°, 90°]; \e west and \e east should
|
||||
* be in the range [−540°, 540°).
|
||||
* the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
void CacheArea(double south, double west, double north, double east);
|
||||
|
||||
|
|
@ -189,34 +186,10 @@ namespace NETGeographicLib
|
|||
* never happens if (\e lat, \e lon) is within a successfully cached area.
|
||||
* @return geoid height (meters).
|
||||
*
|
||||
* The latitude should be in [−90°, 90°] and
|
||||
* longitude should be in [−540°, 540°).
|
||||
* The latitude should be in [−90°, 90°].
|
||||
**********************************************************************/
|
||||
double Height(double lat, double lon);
|
||||
|
||||
/**
|
||||
* Compute the geoid height and gradient at a point
|
||||
*
|
||||
* @param[in] lat latitude of the point (degrees).
|
||||
* @param[in] lon longitude of the point (degrees).
|
||||
* @param[out] gradn northerly gradient (dimensionless).
|
||||
* @param[out] grade easterly gradient (dimensionless).
|
||||
* @exception GeographicErr if there's a problem reading the data; this
|
||||
* never happens if (\e lat, \e lon) is within a successfully cached area.
|
||||
* @return geoid height (meters).
|
||||
*
|
||||
* The latitude should be in [−90°, 90°] and
|
||||
* longitude should be in [−540°, 540°). As a result
|
||||
* of the way that the geoid data is stored, the calculation of gradients
|
||||
* can result in large quantization errors. This is particularly acute for
|
||||
* fine grids, at high latitudes, and for the easterly gradient. If you
|
||||
* need to compute the direction of the acceleration due to gravity
|
||||
* accurately, you should use GravityModel::Gravity.
|
||||
**********************************************************************/
|
||||
double Height(double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% gradn,
|
||||
[System::Runtime::InteropServices::Out] double% grade);
|
||||
|
||||
/**
|
||||
* Convert a height above the geoid to a height above the ellipsoid and
|
||||
* vice versa.
|
||||
|
|
@ -357,22 +330,22 @@ namespace NETGeographicLib
|
|||
/**
|
||||
* @return the default path for geoid data files.
|
||||
*
|
||||
* This is the value of the environment variable GEOID_PATH, if set;
|
||||
* otherwise, it is $GEOGRAPHICLIB_DATA/geoids if the environment variable
|
||||
* This is the value of the environment variable
|
||||
* GEOGRAPHICLIB_GEOID_PATH, if set; otherwise, it is
|
||||
* $GEOGRAPHICLIB_DATA/geoids if the environment variable
|
||||
* GEOGRAPHICLIB_DATA is set; otherwise, it is a compile-time default
|
||||
* (/usr/local/share/GeographicLib/geoids on non-Windows systems and
|
||||
* C:/Documents and Settings/All Users/Application
|
||||
* Data/GeographicLib/geoids on Windows systems).
|
||||
* C:/ProgramData/GeographicLib/geoids on Windows systems).
|
||||
**********************************************************************/
|
||||
static System::String^ DefaultGeoidPath();
|
||||
|
||||
/**
|
||||
* @return the default name for the geoid.
|
||||
*
|
||||
* This is the value of the environment variable GEOID_NAME, if set,
|
||||
* otherwise, it is "egm96-5". The Geoid class does not use this function;
|
||||
* it is just provided as a convenience for a calling program when
|
||||
* constructing a Geoid object.
|
||||
* This is the value of the environment variable
|
||||
* GEOGRAPHICLIB_GEOID_NAME, if set, otherwise, it is "egm96-5". The
|
||||
* Geoid class does not use this function; it is just provided as a
|
||||
* convenience for a calling program when constructing a Geoid object.
|
||||
**********************************************************************/
|
||||
static System::String^ DefaultGeoidName();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* \file NETGeographicLib/Georef.cpp
|
||||
* \brief Source for NETGeographicLib::Georef class
|
||||
*
|
||||
* NETGeographicLib is copyright (c) Scott Heiman (2013-2015)
|
||||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Georef.hpp"
|
||||
#include "Georef.h"
|
||||
#include "NETGeographicLib.h"
|
||||
|
||||
using namespace NETGeographicLib;
|
||||
|
||||
//*****************************************************************************
|
||||
void Georef::Forward(double lat, double lon, int prec, System::String^% georef)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string l;
|
||||
GeographicLib::Georef::Forward( lat, lon, prec, l );
|
||||
georef = gcnew System::String( l.c_str() );
|
||||
}
|
||||
catch ( const std::exception& xcpt )
|
||||
{
|
||||
throw gcnew GeographicErr( xcpt.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
void Georef::Reverse( System::String^ georef, double% lat, double% lon,
|
||||
int% prec, bool centerp)
|
||||
{
|
||||
try
|
||||
{
|
||||
double llat, llon;
|
||||
int lprec;
|
||||
GeographicLib::Georef::Reverse( StringConvert::ManagedToUnmanaged( georef ),
|
||||
llat, llon, lprec, centerp );
|
||||
lat = llat;
|
||||
lon = llon;
|
||||
prec = lprec;
|
||||
}
|
||||
catch ( const std::exception& err )
|
||||
{
|
||||
throw gcnew GeographicErr( err.what() );
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
double Georef::Resolution(int prec) { return GeographicLib::Georef::Resolution(prec); }
|
||||
|
||||
//*****************************************************************************
|
||||
int Georef::Precision(double res) { return GeographicLib::Georef::Precision(res); }
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
/**
|
||||
* \file NETGeographicLib/Georef.h
|
||||
* \brief Header for NETGeographicLib::Georef class
|
||||
*
|
||||
* NETGeographicLib is copyright (c) Scott Heiman (2013-2015)
|
||||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#pragma once
|
||||
|
||||
namespace NETGeographicLib
|
||||
{
|
||||
/**
|
||||
* \brief .NET wrapper for GeographicLib::Georef.
|
||||
*
|
||||
* The World Geographic Reference System is described in
|
||||
* - https://en.wikipedia.org/wiki/Georef
|
||||
* - http://earth-info.nga.mil/GandG/coordsys/grids/georef.pdf
|
||||
* .
|
||||
* It provides a compact string representation of a geographic area
|
||||
* (expressed as latitude and longitude). The classes GARS and Geohash
|
||||
* implement similar compact representations.
|
||||
*
|
||||
* C# Example:
|
||||
* \include example-Georef.cs
|
||||
* Managed C++ Example:
|
||||
* \include example-Georef.cpp
|
||||
* Visual Basic Example:
|
||||
* \include example-Georef.vb
|
||||
**********************************************************************/
|
||||
public ref class Georef
|
||||
{
|
||||
private:
|
||||
// hide the constructor since all members of this class are static.
|
||||
Georef() {}
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert from geographic coordinates to georef.
|
||||
*
|
||||
* @param[in] lat latitude of point (degrees).
|
||||
* @param[in] lon longitude of point (degrees).
|
||||
* @param[in] prec the precision of the resulting georef.
|
||||
* @param[out] georef the georef string.
|
||||
* @exception GeographicErr if \e lat is not in [−90°,
|
||||
* 90°] or if memory for \e georef can't be allocated.
|
||||
*
|
||||
* \e prec specifies the precision of \e georef as follows:
|
||||
* - \e prec = −1 (min), 15°
|
||||
* - \e prec = 0, 1°
|
||||
* - \e prec = 1, converted to \e prec = 2
|
||||
* - \e prec = 2, 1'
|
||||
* - \e prec = 3, 0.1'
|
||||
* - \e prec = 4, 0.01'
|
||||
* - \e prec = 5, 0.001'
|
||||
* - …
|
||||
* - \e prec = 11 (max), 10<sup>−9</sup>'
|
||||
*
|
||||
* If \e lat or \e lon is NaN, then \e georef is set to "INVALID".
|
||||
**********************************************************************/
|
||||
static void Forward(double lat, double lon, int prec,
|
||||
[System::Runtime::InteropServices::Out] System::String^% georef);
|
||||
|
||||
/**
|
||||
* Convert from Georef to geographic coordinates.
|
||||
*
|
||||
* @param[in] georef the Georef.
|
||||
* @param[out] lat latitude of point (degrees).
|
||||
* @param[out] lon longitude of point (degrees).
|
||||
* @param[out] prec the precision of \e georef.
|
||||
* @param[in] centerp if true (the default) return the center
|
||||
* \e georef, otherwise return the south-west corner.
|
||||
* @exception GeographicErr if \e georef is illegal.
|
||||
*
|
||||
* The case of the letters in \e georef is ignored. \e prec is in the
|
||||
* range [−1, 11] and gives the precision of \e georef as follows:
|
||||
* - \e prec = −1 (min), 15°
|
||||
* - \e prec = 0, 1°
|
||||
* - \e prec = 1, not returned
|
||||
* - \e prec = 2, 1'
|
||||
* - \e prec = 3, 0.1'
|
||||
* - \e prec = 4, 0.01'
|
||||
* - \e prec = 5, 0.001'
|
||||
* - …
|
||||
* - \e prec = 11 (max), 10<sup>−9</sup>'
|
||||
*
|
||||
* If the first 3 characters of \e georef are "INV", then \e lat and \e lon
|
||||
* are set to NaN and \e prec is unchanged.
|
||||
**********************************************************************/
|
||||
static void Reverse( System::String^ georef,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
[System::Runtime::InteropServices::Out] double% lon,
|
||||
[System::Runtime::InteropServices::Out] int% prec,
|
||||
bool centerp );
|
||||
|
||||
/**
|
||||
* The angular resolution of a Georef.
|
||||
*
|
||||
* @param[in] prec the precision of the Georef.
|
||||
* @return the latitude-longitude resolution (degrees).
|
||||
*
|
||||
* Internally, \e prec is first put in the range [−1, 11].
|
||||
**********************************************************************/
|
||||
static double Resolution(int prec);
|
||||
|
||||
/**
|
||||
* The Georef precision required to meet a given geographic resolution.
|
||||
*
|
||||
* @param[in] res the minimum of resolution in latitude and longitude
|
||||
* (degrees).
|
||||
* @return Georef precision.
|
||||
*
|
||||
* The returned length is in the range [0, 11].
|
||||
**********************************************************************/
|
||||
static int Precision(double res);
|
||||
};
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/Gnomonic.hpp"
|
||||
|
|
@ -49,7 +49,7 @@ Gnomonic::Gnomonic()
|
|||
{
|
||||
try
|
||||
{
|
||||
m_pGnomonic = new GeographicLib::Gnomonic( GeographicLib::Geodesic::WGS84 );
|
||||
m_pGnomonic = new GeographicLib::Gnomonic( GeographicLib::Geodesic::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -21,12 +21,12 @@ namespace NETGeographicLib
|
|||
* %Gnomonic projection centered at an arbitrary position \e C on the
|
||||
* ellipsoid. This projection is derived in Section 8 of
|
||||
* - C. F. F. Karney,
|
||||
* <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* Algorithms for geodesics</a>,
|
||||
* J. Geodesy <b>87</b>, 43--55 (2013);
|
||||
* DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
|
||||
* DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
|
||||
* 10.1007/s00190-012-0578-z</a>;
|
||||
* addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
|
||||
* addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
|
||||
* geod-addenda.html</a>.
|
||||
* .
|
||||
* The projection of \e P is defined as follows: compute the geodesic line
|
||||
|
|
@ -140,15 +140,15 @@ namespace NETGeographicLib
|
|||
* @param[out] azi azimuth of geodesic at point (degrees).
|
||||
* @param[out] rk reciprocal of azimuthal scale at point.
|
||||
*
|
||||
* \e lat0 and \e lat should be in the range [−90°, 90°] and
|
||||
* \e lon0 and \e lon should be in the range [−540°, 540°).
|
||||
* The scale of the projection is 1/<i>rk</i><sup>2</sup> in the "radial"
|
||||
* direction, \e azi clockwise from true north, and is 1/\e rk in the
|
||||
* direction perpendicular to this. If the point lies "over the horizon",
|
||||
* i.e., if \e rk ≤ 0, then NaNs are returned for \e x and \e y (the
|
||||
* correct values are returned for \e azi and \e rk). A call to Forward
|
||||
* followed by a call to Reverse will return the original (\e lat, \e lon)
|
||||
* (to within roundoff) provided the point in not over the horizon.
|
||||
* \e lat0 and \e lat should be in the range [−90°, 90°].
|
||||
* The scale of the projection is 1/<i>rk</i><sup>2</sup> in the
|
||||
* "radial" direction, \e azi clockwise from true north, and is 1/\e rk
|
||||
* in the direction perpendicular to this. If the point lies "over the
|
||||
* horizon", i.e., if \e rk ≤ 0, then NaNs are returned for \e x and
|
||||
* \e y (the correct values are returned for \e azi and \e rk). A call
|
||||
* to Forward followed by a call to Reverse will return the original
|
||||
* (\e lat, \e lon) (to within roundoff) provided the point in not over
|
||||
* the horizon.
|
||||
**********************************************************************/
|
||||
void Forward(double lat0, double lon0, double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% x,
|
||||
|
|
@ -168,17 +168,16 @@ namespace NETGeographicLib
|
|||
* @param[out] azi azimuth of geodesic at point (degrees).
|
||||
* @param[out] rk reciprocal of azimuthal scale at point.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°] and \e
|
||||
* lon0 should be in the range [−540°, 540°). \e lat
|
||||
* will be in the range [−90°, 90°] and \e lon will
|
||||
* be in the range [−180°, 180°). The scale of the
|
||||
* projection is 1/\e rk<sup>2</sup> in the "radial" direction, \e azi
|
||||
* clockwise from true north, and is 1/\e rk in the direction perpendicular
|
||||
* to this. Even though all inputs should return a valid \e lat and \e
|
||||
* lon, it's possible that the procedure fails to converge for very large
|
||||
* \e x or \e y; in this case NaNs are returned for all the output
|
||||
* arguments. A call to Reverse followed by a call to Forward will return
|
||||
* the original (\e x, \e y) (to roundoff).
|
||||
* \e lat0 should be in the range [−90°, 90°]. \e lat
|
||||
* will be in the range [−90°, 90°] and \e lon will be in
|
||||
* the range [−180°, 180°). The scale of the projection
|
||||
* is 1/\e rk<sup>2</sup> in the "radial" direction, \e azi clockwise
|
||||
* from true north, and is 1/\e rk in the direction perpendicular to
|
||||
* this. Even though all inputs should return a valid \e lat and \e
|
||||
* lon, it's possible that the procedure fails to converge for very
|
||||
* large \e x or \e y; in this case NaNs are returned for all the
|
||||
* output arguments. A call to Reverse followed by a call to Forward
|
||||
* will return the original (\e x, \e y) (to roundoff).
|
||||
**********************************************************************/
|
||||
void Reverse(double lat0, double lon0, double x, double y,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GravityCircle.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -23,7 +23,10 @@ namespace NETGeographicLib
|
|||
* different longitudes to be evaluated rapidly.
|
||||
*
|
||||
* Use GravityModel::Circle to create a GravityCircle object. (The
|
||||
* constructor for this class is for internal use only.)
|
||||
* constructor for this class is private.)
|
||||
*
|
||||
* See \ref gravityparallel for an example of using GravityCircle (together
|
||||
* with OpenMP) to speed up the computation of geoid heights.
|
||||
*
|
||||
* C# Example:
|
||||
* \include example-GravityCircle.cs
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/GravityModel.hpp"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -491,19 +491,18 @@ namespace NETGeographicLib
|
|||
/**
|
||||
* @return the default path for gravity model data files.
|
||||
*
|
||||
* This is the value of the environment variable GRAVITY_PATH, if set;
|
||||
* This is the value of the environment variable GEOGRAPHICLIB_GRAVITY_PATH, if set;
|
||||
* otherwise, it is $GEOGRAPHICLIB_DATA/gravity if the environment variable
|
||||
* GEOGRAPHICLIB_DATA is set; otherwise, it is a compile-time default
|
||||
* (/usr/local/share/GeographicLib/gravity on non-Windows systems and
|
||||
* C:/Documents and Settings/All Users/Application
|
||||
* Data/GeographicLib/gravity on Windows systems).
|
||||
* C:/ProgramData/GeographicLib/gravity on Windows systems).
|
||||
**********************************************************************/
|
||||
static System::String^ DefaultGravityPath();
|
||||
|
||||
/**
|
||||
* @return the default name for the gravity model.
|
||||
*
|
||||
* This is the value of the environment variable GRAVITY_NAME, if set,
|
||||
* This is the value of the environment variable GEOGRAPHICLIB_GRAVITY_NAME, if set,
|
||||
* otherwise, it is "egm96". The GravityModel class does not use
|
||||
* this function; it is just provided as a convenience for a calling
|
||||
* program when constructing a GravityModel object.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/LambertConformalConic.hpp"
|
||||
|
|
@ -93,7 +93,7 @@ LambertConformalConic::LambertConformalConic()
|
|||
try
|
||||
{
|
||||
m_pLambertConformalConic = new GeographicLib::LambertConformalConic(
|
||||
GeographicLib::LambertConformalConic::Mercator );
|
||||
GeographicLib::LambertConformalConic::Mercator() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -77,8 +77,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] stdlat standard parallel (degrees), the circle of tangency.
|
||||
* @param[in] k0 scale on the standard parallel.
|
||||
* @exception GeographicErr if \e a, (1 − \e f ) \e a, or \e k0 is
|
||||
|
|
@ -93,8 +92,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] stdlat1 first standard parallel (degrees).
|
||||
* @param[in] stdlat2 second standard parallel (degrees).
|
||||
* @param[in] k1 scale on the standard parallels.
|
||||
|
|
@ -111,8 +109,7 @@ namespace NETGeographicLib
|
|||
*
|
||||
* @param[in] a equatorial radius of ellipsoid (meters).
|
||||
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
|
||||
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
|
||||
* to 1/\e f.
|
||||
* Negative \e f gives a prolate ellipsoid.
|
||||
* @param[in] sinlat1 sine of first standard parallel.
|
||||
* @param[in] coslat1 cosine of first standard parallel.
|
||||
* @param[in] sinlat2 sine of second standard parallel.
|
||||
|
|
@ -173,14 +170,14 @@ namespace NETGeographicLib
|
|||
* @param[out] gamma meridian convergence at point (degrees).
|
||||
* @param[out] k scale of projection at point.
|
||||
*
|
||||
* The latitude origin is given by LambertConformalConic::LatitudeOrigin().
|
||||
* No false easting or northing is added and \e lat should be in the range
|
||||
* [−90°, 90°]; \e lon and \e lon0 should be in the
|
||||
* range [−540°, 540°). The error in the projection
|
||||
* is less than about 10 nm (10 nanometers), true distance, and the errors
|
||||
* in the meridian convergence and scale are consistent with this. The
|
||||
* values of \e x and \e y returned for points which project to infinity
|
||||
* (i.e., one or both of the poles) will be large but finite.
|
||||
* The latitude origin is given by
|
||||
* LambertConformalConic::LatitudeOrigin(). No false easting or
|
||||
* northing is added and \e lat should be in the range [−90°,
|
||||
* 90°]. The error in the projection is less than about 10 nm (10
|
||||
* nanometers), true distance, and the errors in the meridian
|
||||
* convergence and scale are consistent with this. The values of \e x
|
||||
* and \e y returned for points which project to infinity (i.e., one or
|
||||
* both of the poles) will be large but finite.
|
||||
**********************************************************************/
|
||||
void Forward(double lon0, double lat, double lon,
|
||||
[System::Runtime::InteropServices::Out] double% x,
|
||||
|
|
@ -199,13 +196,12 @@ namespace NETGeographicLib
|
|||
* @param[out] gamma meridian convergence at point (degrees).
|
||||
* @param[out] k scale of projection at point.
|
||||
*
|
||||
* The latitude origin is given by LambertConformalConic::LatitudeOrigin().
|
||||
* No false easting or northing is added. \e lon0 should be in the range
|
||||
* [−540°, 540°). The value of \e lon returned is in
|
||||
* the range [−180°, 180°). The error in the
|
||||
* projection is less than about 10 nm (10 nanometers), true distance, and
|
||||
* the errors in the meridian convergence and scale are consistent with
|
||||
* this.
|
||||
* The latitude origin is given by
|
||||
* LambertConformalConic::LatitudeOrigin(). No false easting or
|
||||
* northing is added. The value of \e lon returned is in the range
|
||||
* [−180°, 180°). The error in the projection is less
|
||||
* than about 10 nm (10 nanometers), true distance, and the errors in
|
||||
* the meridian convergence and scale are consistent with this.
|
||||
**********************************************************************/
|
||||
void Reverse(double lon0, double x, double y,
|
||||
[System::Runtime::InteropServices::Out] double% lat,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/LocalCartesian.hpp"
|
||||
|
|
@ -51,7 +51,7 @@ LocalCartesian::LocalCartesian(double lat0, double lon0, double h0 )
|
|||
try
|
||||
{
|
||||
m_pLocalCartesian = new GeographicLib::LocalCartesian( lat0, lon0, h0,
|
||||
GeographicLib::Geocentric::WGS84 );
|
||||
GeographicLib::Geocentric::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
@ -81,7 +81,7 @@ LocalCartesian::LocalCartesian()
|
|||
try
|
||||
{
|
||||
m_pLocalCartesian = new GeographicLib::LocalCartesian(
|
||||
GeographicLib::Geocentric::WGS84 );
|
||||
GeographicLib::Geocentric::WGS84() );
|
||||
}
|
||||
catch ( std::bad_alloc )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
|
||||
namespace NETGeographicLib
|
||||
|
|
@ -64,8 +64,7 @@ namespace NETGeographicLib
|
|||
* @param[in] earth Geocentric object for the transformation; default
|
||||
* Geocentric::WGS84.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°]; \e
|
||||
* lon0 should be in the range [−540°, 540°).
|
||||
* \e lat0 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
LocalCartesian(double lat0, double lon0, double h0,
|
||||
Geocentric^ earth );
|
||||
|
|
@ -77,8 +76,7 @@ namespace NETGeographicLib
|
|||
* @param[in] lon0 longitude at origin (degrees).
|
||||
* @param[in] h0 height above ellipsoid at origin (meters); default 0.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°]; \e
|
||||
* lon0 should be in the range [−540°, 540°).
|
||||
* \e lat0 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
LocalCartesian(double lat0, double lon0, double h0 );
|
||||
|
||||
|
|
@ -112,8 +110,7 @@ namespace NETGeographicLib
|
|||
* @param[in] lon0 longitude at origin (degrees).
|
||||
* @param[in] h0 height above ellipsoid at origin (meters); default 0.
|
||||
*
|
||||
* \e lat0 should be in the range [−90°, 90°]; \e
|
||||
* lon0 should be in the range [−540°, 540°).
|
||||
* \e lat0 should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
void Reset(double lat0, double lon0, double h0 );
|
||||
|
||||
|
|
@ -127,8 +124,7 @@ namespace NETGeographicLib
|
|||
* @param[out] y local cartesian coordinate (meters).
|
||||
* @param[out] z local cartesian coordinate (meters).
|
||||
*
|
||||
* \e lat should be in the range [−90°, 90°]; \e lon
|
||||
* should be in the range [−540°, 540°).
|
||||
* \e lat should be in the range [−90°, 90°].
|
||||
**********************************************************************/
|
||||
void Forward(double lat, double lon, double h,
|
||||
[System::Runtime::InteropServices::Out] double% x,
|
||||
|
|
@ -147,8 +143,7 @@ namespace NETGeographicLib
|
|||
* @param[out] z local cartesian coordinate (meters).
|
||||
* @param[out] M a 3 × 3 rotation matrix.
|
||||
*
|
||||
* \e lat should be in the range [−90°, 90°]; \e lon
|
||||
* should be in the range [−540°, 540°).
|
||||
* \e lat should be in the range [−90°, 90°].
|
||||
*
|
||||
* Let \e v be a unit vector located at (\e lat, \e lon, \e h). We can
|
||||
* express \e v as \e column vectors in one of two ways
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
|
||||
* <charles@karney.com> and licensed under the MIT/X11 License.
|
||||
* For more information, see
|
||||
* http://geographiclib.sourceforge.net/
|
||||
* https://geographiclib.sourceforge.io/
|
||||
**********************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "GeographicLib/MGRS.hpp"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue