Accumulator.hpp   Accumulator.hpp 
skipping to change at line 12 skipping to change at line 12
* \file Accumulator.hpp * \file Accumulator.hpp
* \brief Header for GeographicLib::Accumulator class * \brief Header for GeographicLib::Accumulator class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_ACCUMULATOR_HPP) #if !defined(GEOGRAPHICLIB_ACCUMULATOR_HPP)
#define GEOGRAPHICLIB_ACCUMULATOR_HPP \ #define GEOGRAPHICLIB_ACCUMULATOR_HPP \
"$Id: 03b7f4fdb9974c822f98d5f5aab1094b5a9ac8f2 $" "$Id: 7a95b0ebcc20534577ea6fcbd3d145e498dd5049 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief An accumulator for sums. * \brief An accumulator for sums
* *
* This allow many numbers of floating point type \e T to be added togeth er * This allow many numbers of floating point type \e T to be added togeth er
* with twice the normal precision. Thus if \e T is double, the effectiv e * with twice the normal precision. Thus if \e T is double, the effectiv e
* precision of the sum is 106 bits or about 32 decimal places. The core * precision of the sum is 106 bits or about 32 decimal places. The core
* idea is the error free transformation of a sum, D. E. Knuth, TAOCP, Vo l 2, * idea is the error free transformation of a sum, D. E. Knuth, TAOCP, Vo l 2,
* 4.2.2, Theorem B. * 4.2.2, Theorem B.
* *
* The implementation follows J. R. Shewchuk, * The implementation follows J. R. Shewchuk,
* <a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision * <a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
* Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>, * Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 AlbersEqualArea.hpp   AlbersEqualArea.hpp 
skipping to change at line 12 skipping to change at line 12
* \file AlbersEqualArea.hpp * \file AlbersEqualArea.hpp
* \brief Header for GeographicLib::AlbersEqualArea class * \brief Header for GeographicLib::AlbersEqualArea class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_ALBERSEQUALAREA_HPP) #if !defined(GEOGRAPHICLIB_ALBERSEQUALAREA_HPP)
#define GEOGRAPHICLIB_ALBERSEQUALAREA_HPP \ #define GEOGRAPHICLIB_ALBERSEQUALAREA_HPP \
"$Id: d17f37d1bec84543dc3753e882d8e95f1c1d5a1b $" "$Id: ac57b23974e41848724eba72e55887112d67c85a $"
#include <algorithm> #include <algorithm>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Albers Equal Area Conic Projection * \brief Albers equal area conic projection
* *
* Implementation taken from the report, * Implementation taken from the report,
* - J. P. Snyder, * - J. P. Snyder,
* <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A * <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A
* Working Manual</a>, USGS Professional Paper 1395 (1987), * Working Manual</a>, USGS Professional Paper 1395 (1987),
* pp. 101&ndash;102. * pp. 101&ndash;102.
* *
* This is a implementation of the equations in Snyder except that divide d * This is a implementation of the equations in Snyder except that divide d
* differences will be [have been] used to transform the expressions into * differences will be [have been] used to transform the expressions into
* ones which may be evaluated accurately. [In this implementation, the * ones which may be evaluated accurately. [In this implementation, the
skipping to change at line 82 skipping to change at line 82
static const real tol0_; static const real tol0_;
static const real ahypover_; static const real ahypover_;
static const int numit_ = 5; // Newton iterations in Reverse static const int numit_ = 5; // Newton iterations in Reverse
static const int numit0_ = 20; // Newton iterations in Init static const int numit0_ = 20; // Newton iterations in Init
static inline real hyp(real x) throw() { return Math::hypot(real(1), x) ; } static inline real hyp(real x) throw() { return Math::hypot(real(1), x) ; }
// atanh( e * x)/ e if f > 0 // atanh( e * x)/ e if f > 0
// atan (sqrt(-e2) * x)/sqrt(-e2) if f < 0 // atan (sqrt(-e2) * x)/sqrt(-e2) if f < 0
// x if f = 0 // x if f = 0
inline real atanhee(real x) const throw() { inline real atanhee(real x) const throw() {
return _f > 0 ? Math::atanh(_e * x)/_e : return _f > 0 ? Math::atanh(_e * x)/_e :
(_f < 0 ? std::atan(_e * x)/_e : x); // We only invoke atanhee in txif for positive latitude. Then x is
// only negative for very prolate ellipsoids (_b/_a >= sqrt(2)) and
we
// still need to return a positive result in this case; hence the n
eed
// for the call to atan2.
(_f < 0 ? (std::atan2(_e * std::abs(x), x < 0 ? -1 : 1)/_e) : x);
} }
// return atanh(sqrt(x))/sqrt(x) - 1, accurate for small x // return atanh(sqrt(x))/sqrt(x) - 1, accurate for small x
static real atanhxm1(real x) throw(); static real atanhxm1(real x) throw();
// Divided differences // Divided differences
// Definition: Df(x,y) = (f(x)-f(y))/(x-y) // Definition: Df(x,y) = (f(x)-f(y))/(x-y)
// See: W. M. Kahan and R. J. Fateman, // See: W. M. Kahan and R. J. Fateman,
// Symbolic computation of divided differences, // Symbolic computation of divided differences,
// SIGSAM Bull. 33(3), 7-28 (1999) // SIGSAM Bull. 33(3), 7-28 (1999)
// http://doi.acm.org/10.1145/334714.334716 // http://doi.acm.org/10.1145/334714.334716
skipping to change at line 117 skipping to change at line 121
// Datanhee(x,y) = atanhee((x-y)/(1-e^2*x*y))/(x-y) // Datanhee(x,y) = atanhee((x-y)/(1-e^2*x*y))/(x-y)
inline real Datanhee(real x, real y) const throw() { inline real Datanhee(real x, real y) const throw() {
real t = x - y, d = 1 - _e2 * x * y; real t = x - y, d = 1 - _e2 * x * y;
return t != 0 ? atanhee(t / d) / t : 1 / d; return t != 0 ? atanhee(t / d) / t : 1 / d;
} }
// DDatanhee(x,y) = (Datanhee(1,y) - Datanhee(1,x))/(y-x) // DDatanhee(x,y) = (Datanhee(1,y) - Datanhee(1,x))/(y-x)
real DDatanhee(real x, real y) const throw(); real DDatanhee(real x, real y) const throw();
void Init(real sphi1, real cphi1, real sphi2, real cphi2, real k1) thro w(); void Init(real sphi1, real cphi1, real sphi2, real cphi2, real k1) thro w();
real txif(real tphi) const throw(); real txif(real tphi) const throw();
real tphif(real txi) const throw(); real tphif(real txi) const throw();
friend class Ellipsoid; // For access to txif, tphif, etc.
public: public:
/** /**
* Constructor with a single standard parallel. * Constructor with a single standard parallel.
* *
* @param[in] a equatorial radius of ellipsoid (meters). * @param[in] a equatorial radius of ellipsoid (meters).
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphe re. * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphe re.
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flatten ing * Negative \e f gives a prolate ellipsoid. If \e f > 1, set flatten ing
* to 1/\e f. * to 1/\e f.
* @param[in] stdlat standard parallel (degrees), the circle of tangenc y. * @param[in] stdlat standard parallel (degrees), the circle of tangenc y.
 End of changes. 4 change blocks. 
3 lines changed or deleted 11 lines changed or added


 AzimuthalEquidistant.hpp   AzimuthalEquidistant.hpp 
skipping to change at line 12 skipping to change at line 12
* \file AzimuthalEquidistant.hpp * \file AzimuthalEquidistant.hpp
* \brief Header for GeographicLib::AzimuthalEquidistant class * \brief Header for GeographicLib::AzimuthalEquidistant class
* *
* Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP) #if !defined(GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP)
#define GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP \ #define GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP \
"$Id: 95a1d6e7a8c4613be25ec32550231601202da1e5 $" "$Id: 585a3b7b28ec2cb070d8ba5a472fea83c9a21f7f $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Azimuthal Equidistant Projection. * \brief Azimuthal equidistant projection
* *
* Azimuthal equidistant projection centered at an arbitrary position on the * Azimuthal equidistant projection centered at an arbitrary position on the
* ellipsoid. For a point in projected space (\e x, \e y), the geodesic * ellipsoid. For a point in projected space (\e x, \e y), the geodesic
* distance from the center position is hypot(\e x, \e y) and the azimuth of * distance from the center position is hypot(\e x, \e y) and the azimuth of
* the geodesic from the center point is atan2(\e x, \e y). The Forward and * the geodesic from the center point is atan2(\e x, \e y). The Forward and
* Reverse methods also return the azimuth \e azi of the geodesic at (\e x, * Reverse methods also return the azimuth \e azi of the geodesic at (\e x,
* \e y) and reciprocal scale \e rk in the azimuthal direction which, * \e y) and reciprocal scale \e rk in the azimuthal direction which,
* together with the basic properties of the projection, serve to specify * together with the basic properties of the projection, serve to specify
* completely the local affine transformation between geographic and * completely the local affine transformation between geographic and
* projected coordinates. * projected coordinates.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 CassiniSoldner.hpp   CassiniSoldner.hpp 
skipping to change at line 12 skipping to change at line 12
* \file CassiniSoldner.hpp * \file CassiniSoldner.hpp
* \brief Header for GeographicLib::CassiniSoldner class * \brief Header for GeographicLib::CassiniSoldner class
* *
* Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CASSINISOLDNER_HPP) #if !defined(GEOGRAPHICLIB_CASSINISOLDNER_HPP)
#define GEOGRAPHICLIB_CASSINISOLDNER_HPP \ #define GEOGRAPHICLIB_CASSINISOLDNER_HPP \
"$Id: d794ea8a1e64fd9cbb8dcee34755b6dc4fee623a $" "$Id: 0faa2e3045fa02878e47c4c76da781062a0bdf54 $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicLine.hpp> #include <GeographicLib/GeodesicLine.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Cassini-Soldner Projection. * \brief Cassini-Soldner projection
* *
* Cassini-Soldner projection centered at an arbitrary position, \e lat0, \e * Cassini-Soldner projection centered at an arbitrary position, \e lat0, \e
* lon0, on the ellipsoid. This projection is a transverse cylindrical * lon0, on the ellipsoid. This projection is a transverse cylindrical
* equidistant projection. The projection from (\e lat, \e lon) to easti ng * equidistant projection. The projection from (\e lat, \e lon) to easti ng
* and northing (\e x, \e y) is defined by geodesics as follows. Go nort h * and northing (\e x, \e y) is defined by geodesics as follows. Go nort h
* along a geodesic a distance \e y from the central point; then turn * along a geodesic a distance \e y from the central point; then turn
* clockwise 90<sup>o</sup> and go a distance \e x along a geodesic. * clockwise 90<sup>o</sup> and go a distance \e x along a geodesic.
* (Although the initial heading is north, this changes to south if the p ole * (Although the initial heading is north, this changes to south if the p ole
* is crossed.) This procedure uniquely defines the reverse projection. The * is crossed.) This procedure uniquely defines the reverse projection. The
* forward projection is constructed as follows. Find the point (\e lat1 , \e * forward projection is constructed as follows. Find the point (\e lat1 , \e
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 CircularEngine.hpp   CircularEngine.hpp 
skipping to change at line 12 skipping to change at line 12
* \file CircularEngine.hpp * \file CircularEngine.hpp
* \brief Header for GeographicLib::CircularEngine class * \brief Header for GeographicLib::CircularEngine class
* *
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der * Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der
* the MIT/X11 License. For more information, see * the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CIRCULARENGINE_HPP) #if !defined(GEOGRAPHICLIB_CIRCULARENGINE_HPP)
#define GEOGRAPHICLIB_CIRCULARENGINE_HPP \ #define GEOGRAPHICLIB_CIRCULARENGINE_HPP \
"$Id: d0528f468369dbc1b7af11e02278ad7a361d398b $" "$Id: 1e012847f5ecd4d38f3cfdae7ef3badebb433da5 $"
#include <vector> #include <vector>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/SphericalEngine.hpp> #include <GeographicLib/SphericalEngine.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs vector // Squelch warnings about dll vs vector
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
#endif #endif
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Spherical Harmonic sums for a circle. * \brief Spherical harmonic sums for a circle
* *
* The class is a companion to SphericalEngine. If the results of a * The class is a companion to SphericalEngine. If the results of a
* spherical harmonic sum are needed for several points on a circle of * spherical harmonic sum are needed for several points on a circle of
* constant latitude \e lat and height \e h, then SphericalEngine::Circle can * constant latitude \e lat and height \e h, then SphericalEngine::Circle can
* compute the inner sum, which is independent of longitude \e lon, and * compute the inner sum, which is independent of longitude \e lon, and
* produce a CircularEngine object. CircularEngine::operator()() can * produce a CircularEngine object. CircularEngine::operator()() can
* then be used to perform the outer sum for particular vales of \e lon. * then be used to perform the outer sum for particular vales of \e lon.
* This can lead to substantial improvements in computational speed for h igh * This can lead to substantial improvements in computational speed for h igh
* degree sum (approximately by a factor of \e N / 2 where \e N is the * degree sum (approximately by a factor of \e N / 2 where \e N is the
* maximum degree). * maximum degree).
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Config.h   Config.h 
#define HAVE_LONG_DOUBLE 1 #define HAVE_LONG_DOUBLE 1
#define GEOGRAPHICLIB_VERSION_STRING "1.21" #define GEOGRAPHICLIB_VERSION_STRING "1.22"
/* # undef WORDS_BIGENDIAN */ /* # undef WORDS_BIGENDIAN */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 Constants.hpp   Constants.hpp 
skipping to change at line 12 skipping to change at line 12
* \file Constants.hpp * \file Constants.hpp
* \brief Header for GeographicLib::Constants class * \brief Header for GeographicLib::Constants class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CONSTANTS_HPP) #if !defined(GEOGRAPHICLIB_CONSTANTS_HPP)
#define GEOGRAPHICLIB_CONSTANTS_HPP \ #define GEOGRAPHICLIB_CONSTANTS_HPP \
"$Id: 895e4bd91979aae347436bbf6be37964f05f5b6f $" "$Id: 9d779f7a1f6939407128e2dcb925b1dc96f74f69 $"
#include <GeographicLib/Config.h> #include <GeographicLib/Config.h>
/** /**
* A compile-time assert. Use C++11 static_assert, if available. * A compile-time assert. Use C++11 static_assert, if available.
**********************************************************************/ **********************************************************************/
#if !defined(STATIC_ASSERT) #if !defined(STATIC_ASSERT)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) # if defined(__GXX_EXPERIMENTAL_CXX0X__)
# define STATIC_ASSERT static_assert # define STATIC_ASSERT static_assert
# elif defined(_MSC_VER) && _MSC_VER >= 1600 # elif defined(_MSC_VER) && _MSC_VER >= 1600
skipping to change at line 41 skipping to change at line 41
// Suppress "defined but not used" warnings // Suppress "defined but not used" warnings
# define RCSID_DECL(x) namespace \ # define RCSID_DECL(x) namespace \
{ char VAR_ ## x [] __attribute__((used)) = x; } { char VAR_ ## x [] __attribute__((used)) = x; }
#else #else
/** /**
* Insertion of RCS Id strings into the object file. * Insertion of RCS Id strings into the object file.
**********************************************************************/ **********************************************************************/
# define RCSID_DECL(x) namespace { char VAR_ ## x [] = x; } # define RCSID_DECL(x) namespace { char VAR_ ## x [] = x; }
#endif #endif
#if defined(_WIN32) && defined(GEOGRAPHIC_SHARED_LIB) #if defined(_WIN32) && defined(GEOGRAPHIC_SHARED_LIB) && GEOGRAPHIC_SHARED_ LIB
# if defined(Geographic_EXPORTS) # if defined(Geographic_EXPORTS)
# define GEOGRAPHIC_EXPORT __declspec(dllexport) # define GEOGRAPHIC_EXPORT __declspec(dllexport)
# else # else
# define GEOGRAPHIC_EXPORT __declspec(dllimport) # define GEOGRAPHIC_EXPORT __declspec(dllimport)
# endif # endif
#else #else
# define GEOGRAPHIC_EXPORT # define GEOGRAPHIC_EXPORT
#endif #endif
#include <stdexcept> #include <stdexcept>
#include <GeographicLib/Math.hpp> #include <GeographicLib/Math.hpp>
/** /**
* \brief Namespace for %GeographicLib * \brief Namespace for %GeographicLib
* *
* All of %GeographicLib is defined within the GeographicLib namespace. In * All of %GeographicLib is defined within the GeographicLib namespace. In
* addition all the header files are included via %GeographicLib/filename. * addition all the header files are included via %GeographicLib/Class.hpp.
* This minimizes the likelihood of conflicts with other packages. * This minimizes the likelihood of conflicts with other packages.
**********************************************************************/ **********************************************************************/
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief %Constants needed by %GeographicLib * \brief %Constants needed by %GeographicLib
* *
* Define constants specifying the WGS84 ellipsoid, the UTM and UPS * Define constants specifying the WGS84 ellipsoid, the UTM and UPS
* projections, and various unit conversions. * projections, and various unit conversions.
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 DMS.hpp   DMS.hpp 
/** /**
* \file DMS.hpp * \file DMS.hpp
* \brief Header for GeographicLib::DMS class * \brief Header for GeographicLib::DMS class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_DMS_HPP) #if !defined(GEOGRAPHICLIB_DMS_HPP)
#define GEOGRAPHICLIB_DMS_HPP "$Id: 67770a78c105495a31a9d3755c811e938729c85 a $" #define GEOGRAPHICLIB_DMS_HPP "$Id: b785083c68342befaed31fa99990bc7d26dbce3 9 $"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/Utility.hpp> #include <GeographicLib/Utility.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs string // Squelch warnings about dll vs string
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
#endif #endif
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Convert between degrees and %DMS representation. * \brief Convert between degrees and the %DMS representation
* *
* Parse a string representing degree, minutes, and seconds and return th e * Parse a string representing degree, minutes, and seconds and return th e
* angle in degrees and format an angle in degrees as degree, minutes, an d * angle in degrees and format an angle in degrees as degree, minutes, an d
* seconds. In addition, handle NANs and infinities on input and output. * seconds. In addition, handle NANs and infinities on input and output.
* *
* Example of use: * Example of use:
* \include example-DMS.cpp * \include example-DMS.cpp
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT DMS { class GEOGRAPHIC_EXPORT DMS {
private: private:
skipping to change at line 333 skipping to change at line 333
* (instead of d, ', &quot; delimiters). * (instead of d, ', &quot; delimiters).
* @return formatted string * @return formatted string
* *
* \e prec indicates the precision relative to 1 degree, e.g., \e prec = 3 * \e prec indicates the precision relative to 1 degree, e.g., \e prec = 3
* gives a result accurate to 0.1' and \e prec = 4 gives a result accur ate * gives a result accurate to 0.1' and \e prec = 4 gives a result accur ate
* to 1&quot;. \e ind is interpreted as in DMS::Encode with the additi onal * to 1&quot;. \e ind is interpreted as in DMS::Encode with the additi onal
* facility that DMS::NUMBER represents \e angle as a number in fixed * facility that DMS::NUMBER represents \e angle as a number in fixed
* format with precision \e prec. * format with precision \e prec.
********************************************************************** / ********************************************************************** /
static std::string Encode(real angle, unsigned prec, flag ind = NONE, static std::string Encode(real angle, unsigned prec, flag ind = NONE,
char dmssep = char(0)) { char dmssep = char(0)) {
return ind == NUMBER ? Utility::str<real>(angle, int(prec)) : return ind == NUMBER ? Utility::str<real>(angle, int(prec)) :
Encode(angle, Encode(angle,
prec < 2 ? DEGREE : (prec < 4 ? MINUTE : SECOND), prec < 2 ? DEGREE : (prec < 4 ? MINUTE : SECOND),
prec < 2 ? prec : (prec < 4 ? prec - 2 : prec - 4), prec < 2 ? prec : (prec < 4 ? prec - 2 : prec - 4),
ind, dmssep); ind, dmssep);
} }
/** /**
* Split angle into degrees and minutes * Split angle into degrees and minutes
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 EllipticFunction.hpp   EllipticFunction.hpp 
skipping to change at line 12 skipping to change at line 12
* \file EllipticFunction.hpp * \file EllipticFunction.hpp
* \brief Header for GeographicLib::EllipticFunction class * \brief Header for GeographicLib::EllipticFunction class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP) #if !defined(GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP)
#define GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP \ #define GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP \
"$Id: 30ac447643e48afcaf5ab4671fbf2b235008dabe $" "$Id: fdcfd14ffa66adbc9ac813b93b62e302eada1d7c $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Elliptic functions needed for TransverseMercatorExact * \brief Elliptic functions needed for TransverseMercatorExact
* *
* This provides the subset of elliptic functions needed for * This provides the subset of elliptic functions needed for
* TransverseMercatorExact. For a given ellipsoid, only parameters * TransverseMercatorExact. For a given ellipsoid, only parameters
skipping to change at line 90 skipping to change at line 90
********************************************************************** / ********************************************************************** /
Math::real m1() const throw() { return _m1; } Math::real m1() const throw() { return _m1; }
/** /**
* @return the complete integral of first kind, \e K(\e m). * @return the complete integral of first kind, \e K(\e m).
********************************************************************** / ********************************************************************** /
Math::real K() const throw() { _init || Init(); return _kc; } Math::real K() const throw() { _init || Init(); return _kc; }
/** /**
* @return the complete integral of second kind, \e E(\e m). * @return the complete integral of second kind, \e E(\e m).
*
* This function returns the correct result even when \e m is negative.
********************************************************************** / ********************************************************************** /
Math::real E() const throw() { _init || Init(); return _ec; } Math::real E() const throw() { _init || Init(); return _ec; }
/** /**
* @return the difference \e K(\e m) - \e E(\e m) (which can be compute d * @return the difference \e K(\e m) - \e E(\e m) (which can be compute d
* directly). * directly).
********************************************************************** / ********************************************************************** /
Math::real KE() const throw() { _init || Init(); return _kec; } Math::real KE() const throw() { _init || Init(); return _kec; }
/** /**
skipping to change at line 118 skipping to change at line 120
/** /**
* The incomplete integral of the second kind. * The incomplete integral of the second kind.
* *
* @param[in] phi * @param[in] phi
* @return int sqrt(1 - \e m sin<sup>2</sup>(\e phi)) \e dphi. * @return int sqrt(1 - \e m sin<sup>2</sup>(\e phi)) \e dphi.
********************************************************************** / ********************************************************************** /
Math::real E(real phi) const throw(); Math::real E(real phi) const throw();
/** /**
* The incomplete integral of the second kind.
*
* @param[in] ang in <i>degrees</i>.
* @return int sqrt(1 - \e m sin<sup>2</sup>(\e phi)) \e dphi.
*
* \e ang must lie in [-90, 90]. This function returns the correct res
ult
* even when \e m is negative.
**********************************************************************
/
Math::real Ed(real ang) const throw();
/**
* The incomplete integral of the second kind in terms of Jacobi ellipt ic * The incomplete integral of the second kind in terms of Jacobi ellipt ic
* functions * functions
* *
* @param[in] sn * @param[in] sn
* @param[in] cn * @param[in] cn
* @param[in] dn * @param[in] dn
* @return int dn(\e w)<sup>2</sup> \e dw (A+S 17.2.10). * @return int dn(\e w)<sup>2</sup> \e dw (A+S 17.2.10).
* *
* Instead of specifying the amplitude \e phi, we provide \e sn = sin(\ e * Instead of specifying the amplitude \e phi, we provide \e sn = sin(\ e
* phi), \e cn = cos(\e phi), \e dn = sqrt(1 - \e m sin<sup>2</sup>(\e * phi), \e cn = cos(\e phi), \e dn = sqrt(1 - \e m sin<sup>2</sup>(\e
 End of changes. 3 change blocks. 
1 lines changed or deleted 16 lines changed or added


 Geodesic.hpp   Geodesic.hpp 
skipping to change at line 12 skipping to change at line 12
* \file Geodesic.hpp * \file Geodesic.hpp
* \brief Header for GeographicLib::Geodesic class * \brief Header for GeographicLib::Geodesic class
* *
* Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEODESIC_HPP) #if !defined(GEOGRAPHICLIB_GEODESIC_HPP)
#define GEOGRAPHICLIB_GEODESIC_HPP \ #define GEOGRAPHICLIB_GEODESIC_HPP \
"$Id: c1b085aadd7b8eabe0f9518b29531a38c152d495 $" "$Id: df63b56b6cca3c80859b8d0448745800b40106fc $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if !defined(GEOD_ORD) #if !defined(GEOD_ORD)
/** /**
* The order of the expansions used by Geodesic. * The order of the expansions used by Geodesic.
**********************************************************************/ **********************************************************************/
#define GEOD_ORD \ #define GEOD_ORD \
(GEOGRAPHICLIB_PREC == 1 ? 6 : (GEOGRAPHICLIB_PREC == 0 ? 3 : 7)) (GEOGRAPHICLIB_PREC == 1 ? 6 : (GEOGRAPHICLIB_PREC == 0 ? 3 : 7))
#endif #endif
namespace GeographicLib { namespace GeographicLib {
class GeodesicLine; class GeodesicLine;
/** /**
* \brief %Geodesic calculations * \brief %Geodesic calculations
* *
* The shortest path between two points on a ellipsoid at (\e lat1, \e lo n1) * The shortest path between two points on a ellipsoid at (\e lat1, \e lo n1)
* and (\e lat2, \e lon2) is called the geodesic. Its length is \e s12 a nd * and (\e lat2, \e lon2) is called the geodesic. Its length is \e s12 a nd
* the geodesic from point 1 to point 2 has azimuths \e azi1 and \e azi2 at * 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 fr om * the two end points. (The azimuth is the heading measured clockwise fr om
* north. \e azi2 is the "forward" azimuth, i.e., the heading that takes you * 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.)
* *
* Given \e lat1, \e lon1, \e azi1, and \e s12, we can determine \e lat2, \e * 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 * lon2, and \e azi2. This is the \e direct geodesic problem and its
* solution is given by the function Geodesic::Direct. (If \e s12 is * solution is given by the function Geodesic::Direct. (If \e s12 is
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 GeodesicLine.hpp   GeodesicLine.hpp 
skipping to change at line 12 skipping to change at line 12
* \file GeodesicLine.hpp * \file GeodesicLine.hpp
* \brief Header for GeographicLib::GeodesicLine class * \brief Header for GeographicLib::GeodesicLine class
* *
* Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2009-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP) #if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP)
#define GEOGRAPHICLIB_GEODESICLINE_HPP \ #define GEOGRAPHICLIB_GEODESICLINE_HPP \
"$Id: 4bbc611bc3837d78456bc227e17bea39cb443745 $" "$Id: 6d8b4f427813cac9195c1a3a9b785256b34d4e96 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief A geodesic line. * \brief A geodesic line
* *
* GeodesicLine facilitates the determination of a series of points on a * GeodesicLine facilitates the determination of a series of points on a
* single geodesic. The starting point (\e lat1, \e lon1) and the azimut h \e * single geodesic. The starting point (\e lat1, \e lon1) and the azimut h \e
* azi1 are specified in the constructor. GeodesicLine.Position returns the * azi1 are specified in the constructor. GeodesicLine.Position returns the
* location of point 2 a distance \e s12 along the geodesic. Alternative ly * location of point 2 a distance \e s12 along the geodesic. Alternative ly
* GeodesicLine.ArcPosition gives the position of point 2 an arc length \ e * GeodesicLine.ArcPosition gives the position of point 2 an arc length \ e
* a12 along the geodesic. * a12 along the geodesic.
* *
* The default copy constructor and assignment operators work with this * The default copy constructor and assignment operators work with this
* class. Similarly, a vector can be used to hold GeodesicLine objects. * class. Similarly, a vector can be used to hold GeodesicLine objects.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Gnomonic.hpp   Gnomonic.hpp 
skipping to change at line 12 skipping to change at line 12
* \file Gnomonic.hpp * \file Gnomonic.hpp
* \brief Header for GeographicLib::Gnomonic class * \brief Header for GeographicLib::Gnomonic class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GNOMONIC_HPP) #if !defined(GEOGRAPHICLIB_GNOMONIC_HPP)
#define GEOGRAPHICLIB_GNOMONIC_HPP \ #define GEOGRAPHICLIB_GNOMONIC_HPP \
"$Id: f2e7e429e56165c314a518fada607c225132b945 $" "$Id: 8b845d9465a032fdd4b5991d9a02c65599d79deb $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicLine.hpp> #include <GeographicLib/GeodesicLine.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief %Gnomonic Projection. * \brief %Gnomonic projection
* *
* %Gnomonic projection centered at an arbitrary position \e C on the * %Gnomonic projection centered at an arbitrary position \e C on the
* ellipsoid. This projection is derived in Section 13 of * ellipsoid. This projection is derived in Section 13 of
* - C. F. F. Karney, * - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1102.1215v1">Geodesics * <a href="http://arxiv.org/abs/1102.1215v1">Geodesics
* on an ellipsoid of revolution</a>, * on an ellipsoid of revolution</a>,
* Feb. 2011; * Feb. 2011;
* preprint * preprint
* <a href="http://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>. * <a href="http://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>.
* . * .
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 LambertConformalConic.hpp   LambertConformalConic.hpp 
skipping to change at line 12 skipping to change at line 12
* \file LambertConformalConic.hpp * \file LambertConformalConic.hpp
* \brief Header for GeographicLib::LambertConformalConic class * \brief Header for GeographicLib::LambertConformalConic class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP) #if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
#define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP \ #define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP \
"$Id: 9aef04f77098543818681966f13ef97ea47dedb4 $" "$Id: 6b365254690f981dea955760b03204d7d8e00582 $"
#include <algorithm> #include <algorithm>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Lambert Conformal Conic Projection * \brief Lambert conformal conic projection
* *
* Implementation taken from the report, * Implementation taken from the report,
* - J. P. Snyder, * - J. P. Snyder,
* <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A * <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A
* Working Manual</a>, USGS Professional Paper 1395 (1987), * Working Manual</a>, USGS Professional Paper 1395 (1987),
* pp. 107&ndash;109. * pp. 107&ndash;109.
* *
* This is a implementation of the equations in Snyder except that divide d * This is a implementation of the equations in Snyder except that divide d
* differences have been used to transform the expressions into ones whic h * differences have been used to transform the expressions into ones whic h
* may be evaluated accurately and that Newton's method is used to invert the * may be evaluated accurately and that Newton's method is used to invert the
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 LocalCartesian.hpp   LocalCartesian.hpp 
skipping to change at line 12 skipping to change at line 12
* \file LocalCartesian.hpp * \file LocalCartesian.hpp
* \brief Header for GeographicLib::LocalCartesian class * \brief Header for GeographicLib::LocalCartesian class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP) #if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP)
#define GEOGRAPHICLIB_LOCALCARTESIAN_HPP \ #define GEOGRAPHICLIB_LOCALCARTESIAN_HPP \
"$Id: 133014a30695adf3bdea9f4b52613fab458c505a $" "$Id: 31995a29f5216e6346a238edeedeb0e848452954 $"
#include <GeographicLib/Geocentric.hpp> #include <GeographicLib/Geocentric.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Local Cartesian coordinates * \brief Local cartesian coordinates
* *
* Convert between geodetic coordinates latitude = \e lat, longitude = \e * Convert between geodetic coordinates latitude = \e lat, longitude = \e
* lon, height = \e h (measured vertically from the surface of the ellips oid) * lon, height = \e h (measured vertically from the surface of the ellips oid)
* to local cartesian coordinates (\e x, \e y, \e z). The origin of loca l * to local cartesian coordinates (\e x, \e y, \e z). The origin of loca l
* cartesian coordinate system is at \e lat = \e lat0, \e lon = \e lon0, \e h * cartesian coordinate system is at \e lat = \e lat0, \e lon = \e lon0, \e h
* = \e h0. The \e z axis is normal to the ellipsoid; the \e y axis point s * = \e h0. The \e z axis is normal to the ellipsoid; the \e y axis point s
* due north. The plane \e z = - \e h0 is tangent to the ellipsoid. * due north. The plane \e z = - \e h0 is tangent to the ellipsoid.
* *
* The conversions all take place via geocentric coordinates using a * The conversions all take place via geocentric coordinates using a
* Geocentric object (by default Geocentric::WGS84). * Geocentric object (by default Geocentric::WGS84).
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PolarStereographic.hpp   PolarStereographic.hpp 
skipping to change at line 12 skipping to change at line 12
* \file PolarStereographic.hpp * \file PolarStereographic.hpp
* \brief Header for GeographicLib::PolarStereographic class * \brief Header for GeographicLib::PolarStereographic class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP) #if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP)
#define GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP \ #define GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP \
"$Id: 07add8492c46e42012007a8738060abc902a5504 $" "$Id: a8bf5e616f8e1b6b95de40c60ac70d34360c843b $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Polar Stereographic Projection * \brief Polar stereographic projection
* *
* Implementation taken from the report, * Implementation taken from the report,
* - J. P. Snyder, * - J. P. Snyder,
* <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A * <a href="http://pubs.er.usgs.gov/usgspubs/pp/pp1395"> Map Projection s: A
* Working Manual</a>, USGS Professional Paper 1395 (1987), * Working Manual</a>, USGS Professional Paper 1395 (1987),
* pp. 160&ndash;163. * pp. 160&ndash;163.
* *
* This is a straightforward implementation of the equations in Snyder ex cept * This is a straightforward implementation of the equations in Snyder ex cept
* that Newton's method is used to invert the projection. * that Newton's method is used to invert the projection.
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PolygonArea.hpp   PolygonArea.hpp 
skipping to change at line 12 skipping to change at line 12
* \file PolygonArea.hpp * \file PolygonArea.hpp
* \brief Header for GeographicLib::PolygonArea class * \brief Header for GeographicLib::PolygonArea class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_POLYGONAREA_HPP) #if !defined(GEOGRAPHICLIB_POLYGONAREA_HPP)
#define GEOGRAPHICLIB_POLYGONAREA_HPP \ #define GEOGRAPHICLIB_POLYGONAREA_HPP \
"$Id: 7a339f312a9c977b9fccad3c0c8bfa9009d863e2 $" "$Id: 04dc2b7450ed688972073405ebe13d5ac5da5d89 $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/Accumulator.hpp> #include <GeographicLib/Accumulator.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Polygon Areas. * \brief Polygon areas
* *
* This computes the area of a geodesic polygon using the method given * This computes the area of a geodesic polygon using the method given
* Section 15 of * Section 15 of
* - C. F. F. Karney, * - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1102.1215v1">Geodesics * <a href="http://arxiv.org/abs/1102.1215v1">Geodesics
* on an ellipsoid of revolution</a>, * on an ellipsoid of revolution</a>,
* Feb. 2011; * Feb. 2011;
* preprint * preprint
* <a href="http://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>. * <a href="http://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>.
* . * .
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 SphericalEngine.hpp   SphericalEngine.hpp 
skipping to change at line 12 skipping to change at line 12
* \file SphericalEngine.hpp * \file SphericalEngine.hpp
* \brief Header for GeographicLib::SphericalEngine class * \brief Header for GeographicLib::SphericalEngine class
* *
* Copyright (c) Charles Karney (2011, 2012) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2011, 2012) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_SPHERICALENGINE_HPP) #if !defined(GEOGRAPHICLIB_SPHERICALENGINE_HPP)
#define GEOGRAPHICLIB_SPHERICALENGINE_HPP \ #define GEOGRAPHICLIB_SPHERICALENGINE_HPP \
"$Id: f48320a694ecf901d997b23d32ea625e589f9534 $" "$Id: 164f95e6b036576cad0e2e8a176149658f3034e9 $"
#include <vector> #include <vector>
#include <istream> #include <istream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs vector // Squelch warnings about dll vs vector
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 SphericalHarmonic.hpp   SphericalHarmonic.hpp 
skipping to change at line 12 skipping to change at line 12
* \file SphericalHarmonic.hpp * \file SphericalHarmonic.hpp
* \brief Header for GeographicLib::SphericalHarmonic class * \brief Header for GeographicLib::SphericalHarmonic class
* *
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der * Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der
* the MIT/X11 License. For more information, see * the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC_HPP) #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC_HPP)
#define GEOGRAPHICLIB_SPHERICALHARMONIC_HPP \ #define GEOGRAPHICLIB_SPHERICALHARMONIC_HPP \
"$Id: 6fa804c46efd01670cfb7835dd022791b60d2942 $" "$Id: ef47b5e3bd16594a8a82242fa7cac8dcbf5d7dee $"
#include <vector> #include <vector>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/SphericalEngine.hpp> #include <GeographicLib/SphericalEngine.hpp>
#include <GeographicLib/CircularEngine.hpp> #include <GeographicLib/CircularEngine.hpp>
#include <GeographicLib/Geocentric.hpp> #include <GeographicLib/Geocentric.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Spherical Harmonic series * \brief Spherical harmonic series
* *
* This class evaluates the spherical harmonic sum \verbatim * This class evaluates the spherical harmonic sum \verbatim
V(x, y, z) = sum(n = 0..N)[ q^(n+1) * sum(m = 0..n)[ V(x, y, z) = sum(n = 0..N)[ q^(n+1) * sum(m = 0..n)[
(C[n,m] * cos(m*lambda) + S[n,m] * sin(m*lambda)) * (C[n,m] * cos(m*lambda) + S[n,m] * sin(m*lambda)) *
P[n,m](cos(theta)) ] ] P[n,m](cos(theta)) ] ]
\endverbatim \endverbatim
* where * where
* - <i>p</i><sup>2</sup> = <i>x</i><sup>2</sup> + <i>y</i><sup>2</sup>, * - <i>p</i><sup>2</sup> = <i>x</i><sup>2</sup> + <i>y</i><sup>2</sup>,
* - <i>r</i><sup>2</sup> = <i>p</i><sup>2</sup> + <i>z</i><sup>2</sup>, * - <i>r</i><sup>2</sup> = <i>p</i><sup>2</sup> + <i>z</i><sup>2</sup>,
* - \e q = <i>a</i>/<i>r</i>, * - \e q = <i>a</i>/<i>r</i>,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 SphericalHarmonic1.hpp   SphericalHarmonic1.hpp 
skipping to change at line 12 skipping to change at line 12
* \file SphericalHarmonic1.hpp * \file SphericalHarmonic1.hpp
* \brief Header for GeographicLib::SphericalHarmonic1 class * \brief Header for GeographicLib::SphericalHarmonic1 class
* *
* Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der * Copyright (c) Charles Karney (2011) <charles@karney.com> and licensed un der
* the MIT/X11 License. For more information, see * the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC1_HPP) #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC1_HPP)
#define GEOGRAPHICLIB_SPHERICALHARMONIC1_HPP \ #define GEOGRAPHICLIB_SPHERICALHARMONIC1_HPP \
"$Id: 9dd895ded08db0f7fdd82159399da511f40a17e1 $" "$Id: 7164de400276831319d8b0a3792042b1529ecabd $"
#include <vector> #include <vector>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/SphericalEngine.hpp> #include <GeographicLib/SphericalEngine.hpp>
#include <GeographicLib/CircularEngine.hpp> #include <GeographicLib/CircularEngine.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Spherical Harmonic series with a correction to the coefficients . * \brief Spherical harmonic series with a correction to the coefficients
* *
* This classes is similar to SphericalHarmonic, except that the coeffici ents * This classes is similar to SphericalHarmonic, except that the coeffici ents
* \e C<sub>\e nm</sub> are replaced by \e C<sub>\e nm</sub> + \e tau * \e C<sub>\e nm</sub> are replaced by \e C<sub>\e nm</sub> + \e tau
* C'<sub>\e nm</sub> (and similarly for \e S<sub>\e nm</sub>). * C'<sub>\e nm</sub> (and similarly for \e S<sub>\e nm</sub>).
* *
* Example of use: * Example of use:
* \include example-SphericalHarmonic1.cpp * \include example-SphericalHarmonic1.cpp
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT SphericalHarmonic1 { class GEOGRAPHIC_EXPORT SphericalHarmonic1 {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 SphericalHarmonic2.hpp   SphericalHarmonic2.hpp 
skipping to change at line 12 skipping to change at line 12
* \file SphericalHarmonic2.hpp * \file SphericalHarmonic2.hpp
* \brief Header for GeographicLib::SphericalHarmonic2 class * \brief Header for GeographicLib::SphericalHarmonic2 class
* *
* Copyright (c) Charles Karney (2011, 2012) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2011, 2012) <charles@karney.com> and licen sed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC2_HPP) #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC2_HPP)
#define GEOGRAPHICLIB_SPHERICALHARMONIC2_HPP \ #define GEOGRAPHICLIB_SPHERICALHARMONIC2_HPP \
"$Id: ce4cda614c1966dea65610bc73bc4db562677fa8 $" "$Id: 6dbe2934b6bc0ae3d9d457030210a41fb461984b $"
#include <vector> #include <vector>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/SphericalEngine.hpp> #include <GeographicLib/SphericalEngine.hpp>
#include <GeographicLib/CircularEngine.hpp> #include <GeographicLib/CircularEngine.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Spherical Harmonic series with two corrections to the coefficie nts. * \brief Spherical harmonic series with two corrections to the coefficie nts
* *
* This classes is similar to SphericalHarmonic, except that the coeffici ents * This classes is similar to SphericalHarmonic, except that the coeffici ents
* \e C<sub>\e nm</sub> are replaced by \e C<sub>\e nm</sub> + \e tau' * \e C<sub>\e nm</sub> are replaced by \e C<sub>\e nm</sub> + \e tau'
* C'<sub>\e nm</sub> + \e tau'' C''<sub>\e nm</sub> (and similarly for \ e * C'<sub>\e nm</sub> + \e tau'' C''<sub>\e nm</sub> (and similarly for \ e
* S<sub>\e nm</sub>). * S<sub>\e nm</sub>).
* *
* Example of use: * Example of use:
* \include example-SphericalHarmonic2.cpp * \include example-SphericalHarmonic2.cpp
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT SphericalHarmonic2 { // Don't include the GEOGRPAHIC_EXPORT because this header-only class isn
't
// used by any other classes in the library.
class /*GEOGRAPHIC_EXPORT*/ SphericalHarmonic2 {
public: public:
/** /**
* Supported normalizations for associate Legendre polynomials. * Supported normalizations for associate Legendre polynomials.
********************************************************************** / ********************************************************************** /
enum normalization { enum normalization {
/** /**
* Fully normalized associated Legendre polynomials. See * Fully normalized associated Legendre polynomials. See
* SphericalHarmonic::FULL for documentation. * SphericalHarmonic::FULL for documentation.
* *
* @hideinitializer * @hideinitializer
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added


 TransverseMercator.hpp   TransverseMercator.hpp 
skipping to change at line 12 skipping to change at line 12
* \file TransverseMercator.hpp * \file TransverseMercator.hpp
* \brief Header for GeographicLib::TransverseMercator class * \brief Header for GeographicLib::TransverseMercator class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP) #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP)
#define GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP \ #define GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP \
"$Id: 94bb078aa13d2d7392cee5498aae7df6e9914e4a $" "$Id: 967bdfb37093c5355c1ac8e399b06195e33494da $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if !defined(TM_TX_MAXPOW) #if !defined(TM_TX_MAXPOW)
/** /**
* The order of the series approximation used in TransverseMercator. * The order of the series approximation used in TransverseMercator.
* TM_TX_MAXPOW can be set to any integer in [4, 8]. * TM_TX_MAXPOW can be set to any integer in [4, 8].
**********************************************************************/ **********************************************************************/
#define TM_TX_MAXPOW \ #define TM_TX_MAXPOW \
(GEOGRAPHICLIB_PREC == 1 ? 6 : (GEOGRAPHICLIB_PREC == 0 ? 4 : 8)) (GEOGRAPHICLIB_PREC == 1 ? 6 : (GEOGRAPHICLIB_PREC == 0 ? 4 : 8))
#endif #endif
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Transverse Mercator Projection * \brief Transverse Mercator projection
* *
* This uses Kr&uuml;ger's method which evaluates the projection and its * This uses Kr&uuml;ger's method which evaluates the projection and its
* inverse in terms of a series. See * inverse in terms of a series. See
* - L. Kr&uuml;ger, * - L. Kr&uuml;ger,
* <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme * <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
* Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of the * Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of the
* ellipsoidal earth to the plane), Royal Prussian Geodetic Institute, New * ellipsoidal earth to the plane), Royal Prussian Geodetic Institute, New
* Series 52, 172 pp. (1912). * Series 52, 172 pp. (1912).
* - C. F. F. Karney, * - C. F. F. Karney,
* <a href="http://dx.doi.org/10.1007/s00190-011-0445-3"> * <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
skipping to change at line 100 skipping to change at line 100
static inline real tanx(real x) throw() { static inline real tanx(real x) throw() {
real t = std::tan(x); real t = std::tan(x);
// Write the tests this way to ensure that tanx(NaN()) is NaN() // Write the tests this way to ensure that tanx(NaN()) is NaN()
return x >= 0 ? (!(t < 0) ? t : overflow_) : (!(t >= 0) ? t : -overfl ow_); return x >= 0 ? (!(t < 0) ? t : overflow_) : (!(t >= 0) ? t : -overfl ow_);
} }
// Return e * atanh(e * x) for f >= 0, else return // Return e * atanh(e * x) for f >= 0, else return
// - sqrt(-e2) * atan( sqrt(-e2) * x) for f < 0 // - sqrt(-e2) * atan( sqrt(-e2) * x) for f < 0
inline real eatanhe(real x) const throw() { inline real eatanhe(real x) const throw() {
return _f >= 0 ? _e * Math::atanh(_e * x) : - _e * std::atan(_e * x); return _f >= 0 ? _e * Math::atanh(_e * x) : - _e * std::atan(_e * x);
} }
real taupf(real tau) const throw();
real tauf(real taup) const throw();
friend class Ellipsoid; // For access to taupf, tauf.
public: public:
/** /**
* Constructor for a ellipsoid with * Constructor for a ellipsoid with
* *
* @param[in] a equatorial radius (meters). * @param[in] a equatorial radius (meters).
* @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphe re. * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphe re.
* Negative \e f gives a prolate ellipsoid. If \e f > 1, set flatten ing * Negative \e f gives a prolate ellipsoid. If \e f > 1, set flatten ing
* to 1/\e f. * to 1/\e f.
* @param[in] k0 central scale factor. * @param[in] k0 central scale factor.
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 TransverseMercatorExact.hpp   TransverseMercatorExact.hpp 
skipping to change at line 12 skipping to change at line 12
* \file TransverseMercatorExact.hpp * \file TransverseMercatorExact.hpp
* \brief Header for GeographicLib::TransverseMercatorExact class * \brief Header for GeographicLib::TransverseMercatorExact class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP) #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP)
#define GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP \ #define GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP \
"$Id: bd96340b9dc3e7bfd09d4374296a75f4c6e00fc3 $" "$Id: 1ec9c881231a9ed2d2256832a9e642e0197deaa1 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/EllipticFunction.hpp> #include <GeographicLib/EllipticFunction.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief An exact implementation of the Transverse Mercator Projection * \brief An exact implementation of the transverse Mercator projection
* *
* Implementation of the Transverse Mercator Projection given in * Implementation of the Transverse Mercator Projection given in
* - L. P. Lee, * - L. P. Lee,
* <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal * <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal
* Projections Based On Jacobian Elliptic Functions</a>, Part V of * Projections Based On Jacobian Elliptic Functions</a>, Part V of
* Conformal Projections Based on Elliptic Functions, * Conformal Projections Based on Elliptic Functions,
* (B. V. Gutsell, Toronto, 1976), 128pp., * (B. V. Gutsell, Toronto, 1976), 128pp.,
* ISBN: 0919870163 * ISBN: 0919870163
* (also appeared as: * (also appeared as:
* Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13). * Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 UTMUPS.hpp   UTMUPS.hpp 
skipping to change at line 12 skipping to change at line 12
* \file UTMUPS.hpp * \file UTMUPS.hpp
* \brief Header for GeographicLib::UTMUPS class * \brief Header for GeographicLib::UTMUPS class
* *
* Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed * Copyright (c) Charles Karney (2008-2011) <charles@karney.com> and licens ed
* under the MIT/X11 License. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_UTMUPS_HPP) #if !defined(GEOGRAPHICLIB_UTMUPS_HPP)
#define GEOGRAPHICLIB_UTMUPS_HPP \ #define GEOGRAPHICLIB_UTMUPS_HPP \
"$Id: a529ed8aeaeffb02994254bbc7eb1209aa41b9ca $" "$Id: ae9e09602676178c7d9a7e3fdb1c6018b3d87bc9 $"
#include <sstream> #include <sstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Convert between Geographic coordinates and UTM/UPS * \brief Convert between geographic coordinates and UTM/UPS
* *
* UTM and UPS are defined * UTM and UPS are defined
* - J. W. Hager, J. F. Behensky, and B. W. Drew, * - J. W. Hager, J. F. Behensky, and B. W. Drew,
* <a href="http://earth-info.nga.mil/GandG/publications/tm8358.2/TM835 8_2.pdf"> * <a href="http://earth-info.nga.mil/GandG/publications/tm8358.2/TM835 8_2.pdf">
* The Universal Grids: Universal Transverse Mercator (UTM) and Univers al * The Universal Grids: Universal Transverse Mercator (UTM) and Univers al
* Polar Stereographic (UPS)</a>, Defense Mapping Agency, Technical Man ual * Polar Stereographic (UPS)</a>, Defense Mapping Agency, Technical Man ual
* TM8358.2 (1989). * TM8358.2 (1989).
* . * .
* Section 2-3 defines UTM and section 3-2.4 defines UPS. This document also * Section 2-3 defines UTM and section 3-2.4 defines UPS. This document also
* includes approximate algorithms for the computation of the underlying * includes approximate algorithms for the computation of the underlying
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/