Accumulator.hpp   Accumulator.hpp 
/** /**
* \file Accumulator.hpp * \file Accumulator.hpp
* \brief Header for GeographicLib::Accumulator class * \brief Header for GeographicLib::Accumulator class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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 "$Id: 1be1836ceb147e0d84543a2b4572a72 2b17c8e2e $" #define GEOGRAPHICLIB_ACCUMULATOR_HPP "$Id: a33a908abf92c801d781b41a4e175bb 50b3f8680 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
RCSID_DECL(GEOGRAPHICLIB_ACCUMULATOR_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.
 End of changes. 2 change blocks. 
3 lines changed or deleted 1 lines changed or added


 Config.h   Config.h 
#define HAVE_LONG_DOUBLE 1 #define HAVE_LONG_DOUBLE 1
#define GEOGRAPHICLIB_VERSION_STRING "1.13" #define GEOGRAPHICLIB_VERSION_STRING "1.14"
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 Constants.hpp   Constants.hpp 
/** /**
* \file Constants.hpp * \file Constants.hpp
* \brief Header for GeographicLib::Constants class * \brief Header for GeographicLib::Constants class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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 "$Id: 0ca861c6aa90824636e1f47472a8a8fee ab268d0 $" #define GEOGRAPHICLIB_CONSTANTS_HPP "$Id: 199f3b1a85b240770f47ab44ded6f87b3 f69f28e $"
#include <GeographicLib/Config.h> #include <GeographicLib/Config.h>
/** /**
* A compile-time assert. Use C++0X static_assert, if available. * A compile-time assert. Use C++0X 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 50 skipping to change at line 50
#if defined(_WIN32) && defined(GEOGRAPHIC_SHARED_LIB) #if defined(_WIN32) && defined(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
RCSID_DECL(GEOGRAPHICLIB_CONSTANTS_HPP)
#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
* addtion all the header files are included via %GeographicLib/filename. This * addtion all the header files are included via %GeographicLib/filename. This
* minimizes the likelihood of conflicts with other packages. * minimizes the likelihood of conflicts with other packages.
**********************************************************************/ **********************************************************************/
 End of changes. 2 change blocks. 
3 lines changed or deleted 1 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, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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: 16d1a2985b695804891175f5537abff45cd2459 2 $" #define GEOGRAPHICLIB_DMS_HPP "$Id: 6fd4aeaf5388bb95ff1c45bece948f4dea2e1d5 e $"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.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
skipping to change at line 148 skipping to change at line 148
* hemisphere designator (N, E, W, S) may be added to the beginning or end * 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 * 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 * 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 i s * to DMS::LATITUDE if N or S is present, to DMS::LONGITUDE if E or W i s
* present, and to DMS::NONE otherwise. Throws an error on a malformed * 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 * string. No check is performed on the range of the result. Examples of
* legal and illegal strings are * legal and illegal strings are
* - <i>LEGAL</i> (all the entries on each line are equivalent) * - <i>LEGAL</i> (all the entries on each line are equivalent)
* - -20.51125, 20d30'40.5&quot;S, -20d30'40.5, -20d30.675, * - -20.51125, 20d30'40.5&quot;S, -20d30'40.5, -20d30.675,
* N-20d30'40.5&quot;, -20:30:40.5 * N-20d30'40.5&quot;, -20:30:40.5
* - 4d0'9, 4d9", 4d9'', 4:0:9, 004:00:09, 4.0025, 4.0025d, 4d0.15, * - 4d0'9, 4d9&quot;, 4d9'', 4:0:9, 004:00:09, 4.0025, 4.0025d, 4d0. 15,
* 04:.15 * 04:.15
* - <i>ILLEGAL</i> (the exception thrown explains the problem) * - <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, * - 4d5&quot;4', 4::5, 4:5:, :4:5, 4d4.5'4&quot;, -N20.5, 1.8e2d, 4: 60,
* 4d-5' * 4d-5'
* *
* <b>NOTE:</b> At present, all the string handling in the C++ * <b>NOTE:</b> At present, all the string handling in the C++
* implementation %GeographicLib is with 8-bit characters. The support for * implementation %GeographicLib is with 8-bit characters. The support for
* unicode symbols for degrees, minutes, and seconds is therefore via t he * unicode symbols for degrees, minutes, and seconds is therefore via t he
* <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding. (T he * <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding. (T he
* Javascript implementation of this class uses unicode natively, of * Javascript implementation of this class uses unicode natively, of
* course.) * course.)
*
* Here is the list of Unicode symbols supported for degrees, minutes,
* seconds:
* - degrees:
* - d, D lower and upper case letters
* - U+00b0 degree symbol
* - U+00ba masculine ordinal indicator
* - U+2070 superscript zero
* - minutes:
* - ' apostrophe
* - U+2032 prime
* - U+00b4 acute accent
* - seconds:
* - &quot; quotation mark
* - U+2033 double prime
* - '&nbsp;' any two consecutive symbols for minutes
* .
* The codes with a leading zero byte, e.g., U+00b0, are accepted in th
eir
* UTF-8 coded form 0xc2 0xb0 and as a single byte 0xb0.
********************************************************************** / ********************************************************************** /
static Math::real Decode(const std::string& dms, flag& ind); static Math::real Decode(const std::string& dms, flag& ind);
/** /**
* Convert DMS to an angle. * Convert DMS to an angle.
* *
* @param[in] d degrees. * @param[in] d degrees.
* @param[in] m arc minutes. * @param[in] m arc minutes.
* @param[in] s arc seconds. * @param[in] s arc seconds.
* @return angle (degrees) * @return angle (degrees)
skipping to change at line 242 skipping to change at line 261
* @return azimuth (degrees) * @return azimuth (degrees)
* *
* A hemisphere designator E/W can be used; the result is multiplied by -1 * A hemisphere designator E/W can be used; the result is multiplied by -1
* if W is present. Throws an error if the result is out of the range * if W is present. Throws an error if the result is out of the range
* [-180<sup>o</sup>, 360<sup>o</sup>]. Finally the azimuth is reduced to * [-180<sup>o</sup>, 360<sup>o</sup>]. Finally the azimuth is reduced to
* the range [-180<sup>o</sup>, 180<sup>o</sup>). * the range [-180<sup>o</sup>, 180<sup>o</sup>).
********************************************************************** / ********************************************************************** /
static Math::real DecodeAzimuth(const std::string& azistr); static Math::real DecodeAzimuth(const std::string& azistr);
/** /**
* Convert angle (in degrees) into a DMS string. * Convert angle (in degrees) into a DMS string (using d, ', and &quot; ).
* *
* @param[in] angle input angle (degrees) * @param[in] angle input angle (degrees)
* @param[in] trailing DMS::component value indicating the trailing uni ts * @param[in] trailing DMS::component value indicating the trailing uni ts
* on the string and this is given as a decimal number if necessary. * on the string and this is given as a decimal number if necessary.
* @param[in] prec the number of digits after the decimal point for the * @param[in] prec the number of digits after the decimal point for the
* trailing component. * trailing component.
* @param[in] ind DMS::flag value indicated additional formatting. * @param[in] ind DMS::flag value indicated additional formatting.
* @return formatted string * @return formatted string
* *
* The interpretation of \e ind is as follows: * The interpretation of \e ind is as follows:
skipping to change at line 269 skipping to change at line 288
* - ind == DMS::AZIMUTH, convert to the range [0, 360<sup>o</sup>), no * - ind == DMS::AZIMUTH, convert to the range [0, 360<sup>o</sup>), no
* sign, pad degrees to 3 digits, , e.g., 351d57'. * sign, pad degrees to 3 digits, , e.g., 351d57'.
* . * .
* The integer parts of the minutes and seconds components are always g iven * The integer parts of the minutes and seconds components are always g iven
* with 2 digits. * with 2 digits.
********************************************************************** / ********************************************************************** /
static std::string Encode(real angle, component trailing, unsigned prec , static std::string Encode(real angle, component trailing, unsigned prec ,
flag ind = NONE); flag ind = NONE);
/** /**
* Convert angle into a DMS string selecting the trailing component * Convert angle into a DMS string (using d, ', and &quot;) selecting t
* based on the precision. he
* trailing component based on the precision.
* *
* @param[in] angle input angle (degrees) * @param[in] angle input angle (degrees)
* @param[in] prec the precision relative to 1 degree. * @param[in] prec the precision relative to 1 degree.
* @param[in] ind DMS::flag value indicated additional formatting. * @param[in] ind DMS::flag value indicated additional formatting.
* @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 at DMS::NUMBER treats \e angle a number in fixed format wit h * facility at DMS::NUMBER treats \e angle a number in fixed format wit h
 End of changes. 6 change blocks. 
6 lines changed or deleted 27 lines changed or added


 Geodesic.hpp   Geodesic.hpp 
/** /**
* \file Geodesic.hpp * \file Geodesic.hpp
* \brief Header for GeographicLib::Geodesic class * \brief Header for GeographicLib::Geodesic class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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 "$Id: a9dc85ae0526d5af9797527673a442036e c47ba7 $" #define GEOGRAPHICLIB_GEODESIC_HPP "$Id: a4c92fd805c0be70dd88e77bb8508c1a62 bc7804 $"
#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
skipping to change at line 112 skipping to change at line 112
* <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> * <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a>
* for details. * for details.
* *
* The algorithms are described in * The algorithms are described in
* - 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>.
* - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1109.4448">Algorithms for geodesics</a
>,
* Sept. 2011;
* preprint
* <a href="http://arxiv.org/abs/1109.4448">arxiv:1109.4448</a>.
* . * .
* For more information on geodesics see \ref geodesic. * For more information on geodesics see \ref geodesic.
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT Geodesic { class GEOGRAPHIC_EXPORT Geodesic {
private: private:
typedef Math::real real; typedef Math::real real;
friend class GeodesicLine; friend class GeodesicLine;
static const int nA1_ = GEOD_ORD; static const int nA1_ = GEOD_ORD;
static const int nC1_ = GEOD_ORD; static const int nC1_ = GEOD_ORD;
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 GeodesicLine.hpp   GeodesicLine.hpp 
/** /**
* \file GeodesicLine.hpp * \file GeodesicLine.hpp
* \brief Header for GeographicLib::GeodesicLine class * \brief Header for GeographicLib::GeodesicLine class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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 "$Id: c9e1bf8dbc2a53c2dd3f1569b5b7dd c73cd4315e $" #define GEOGRAPHICLIB_GEODESICLINE_HPP "$Id: d48cbce07611a1f8ca015a4d97eedc 83c8c3770a $"
#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
skipping to change at line 65 skipping to change at line 65
\endcode \endcode
* The default copy constructor and assignment operators work with this * The default copy constructor and assignment operators work with this
* class, so that, for example, the previous example could start * class, so that, for example, the previous example could start
\code \code
GeographicLib::GeodesicLine l; GeographicLib::GeodesicLine l;
l = g.Line(lat1, lon1, azi1); l = g.Line(lat1, lon1, azi1);
\endcode \endcode
* Similarly, a vector can be used to hold GeodesicLine objects. * Similarly, a vector can be used to hold GeodesicLine objects.
* *
* The calculations are accurate to better than 15 nm. See Sec. 9 of * The calculations are accurate to better than 15 nm. See Sec. 9 of
* <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for d * <a href="http://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
etails. * details.
* *
* The algorithms are described in * The algorithms are described in
* - 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>.
* - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1109.4448">Algorithms for geodesics</a
>,
* Sept. 2011;
* preprint
* <a href="http://arxiv.org/abs/1109.4448">arxiv:1109.4448</a>.
* . * .
* For more information on geodesics see \ref geodesic. * For more information on geodesics see \ref geodesic.
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT GeodesicLine { class GEOGRAPHIC_EXPORT GeodesicLine {
private: private:
typedef Math::real real; typedef Math::real real;
friend class Geodesic; friend class Geodesic;
static const int nC1_ = Geodesic::nC1_; static const int nC1_ = Geodesic::nC1_;
static const int nC1p_ = Geodesic::nC1p_; static const int nC1p_ = Geodesic::nC1p_;
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added


 Geoid.hpp   Geoid.hpp 
/** /**
* \file Geoid.hpp * \file Geoid.hpp
* \brief Header for GeographicLib::Geoid class * \brief Header for GeographicLib::Geoid class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the MIT/X11 License. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEOID_HPP) #if !defined(GEOGRAPHICLIB_GEOID_HPP)
#define GEOGRAPHICLIB_GEOID_HPP "$Id: 777922a79bee93ab90a258e58a4d2e4fb1b66 5c5 $" #define GEOGRAPHICLIB_GEOID_HPP "$Id: 57b427018406a7397153845cb919865d62263 020 $"
#include <string> #include <string>
#include <vector> #include <vector>
#include <fstream> #include <fstream>
#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)
skipping to change at line 53 skipping to change at line 53
* *
* See \ref geoid for details of how to install the data sets, the data * 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. * format, estimates of the interpolation errors, and how to use caching.
* *
* In addition to returning the geoid height, the gradient of the geoid c an * In addition to returning the geoid height, the gradient of the geoid c an
* be calculated. The gradient is defined as the rate of change of the g eoid * be calculated. The gradient is defined as the rate of change of the g eoid
* as a function of position on the ellipsoid. This uses the parameters for * as a function of position on the ellipsoid. This uses the parameters for
* the WGS84 ellipsoid. The gradient defined in terms of the interpolate d * the WGS84 ellipsoid. The gradient defined in terms of the interpolate d
* heights. As a result of the way that the geoid data is stored, the * heights. As a result of the way that the geoid data is stored, the
* calculation of gradients can result in large quantization errors. Thi s is * calculation of gradients can result in large quantization errors. Thi s is
* particularly acute at high latitudes and for the easterly gradient. * particularly acute for fine grids, at high latitudes, and for the east
erly
* gradient.
* *
* This class is typically \e not thread safe in that a single instantiat ion * This class is typically \e not thread safe in that a single instantiat ion
* cannot be safely used by multiple threads because of the way the objec t * cannot be safely used by multiple threads because of the way the objec t
* reads the data set and because it maintains a single-cell cache. If * reads the data set and because it maintains a single-cell cache. If
* multiple threads need to calculate geoid heights they should all const ruct * multiple threads need to calculate geoid heights they should all const ruct
* thread-local instantiations. Alternatively, set the optional \e * thread-local instantiations. Alternatively, set the optional \e
* threadsafe parameter to true in the constuctor. This causes the * threadsafe parameter to true in the constuctor. This causes the
* constructor to read all the data into memory and to turn off the * constructor to read all the data into memory and to turn off the
* single-cell caching which results in a Geoid object which \e is thread * single-cell caching which results in a Geoid object which \e is thread
* safe. * safe.
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added


 Gnomonic.hpp   Gnomonic.hpp 
/** /**
* \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 "$Id: 6be96232d6e0dbfbeb56fdad884a09cdb8 e82303 $" #define GEOGRAPHICLIB_GNOMONIC_HPP "$Id: 35168bbc58f320e1e117301fd7653b8835 407792 $"
#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>.
* . * .
* See also Section 8 of
* - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1109.4448">Algorithms for geodesics</a
>,
* Sept. 2011;
* preprint
* <a href="http://arxiv.org/abs/1109.4448">arxiv:1109.4448</a>.
* .
* The projection of \e P is defined as follows: compute the * The projection of \e P is defined as follows: compute the
* geodesic line from \e C to \e P; compute the reduced length \e m12, * geodesic line from \e C to \e P; compute the reduced length \e m12,
* geodesic scale \e M12, and \e rho = \e m12/\e M12; finally \e x = \e r ho * geodesic scale \e M12, and \e rho = \e m12/\e M12; finally \e x = \e r ho
* sin \e azi1; \e y = \e rho cos \e azi1, where \e azi1 is the azimuth o f * sin \e azi1; \e y = \e rho cos \e azi1, where \e azi1 is the azimuth o f
* the geodesic at \e C. The Gnomonic::Forward and Gnomonic::Reverse met hods * the geodesic at \e C. The Gnomonic::Forward and Gnomonic::Reverse met hods
* also return the azimuth \e azi of the geodesic at \e P and reciprocal * also return the azimuth \e azi of the geodesic at \e P and reciprocal
* scale \e rk in the azimuthal direction. The scale in the radial direc tion * scale \e rk in the azimuthal direction. The scale in the radial direc tion
* if 1/\e rk<sup>2</sup>. * if 1/\e rk<sup>2</sup>.
* *
* For a sphere, \e rho is reduces to \e a tan(\e s12/\e a), where \e s12 is * For a sphere, \e rho is reduces to \e a tan(\e s12/\e a), where \e s12 is
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 LambertConformalConic.hpp   LambertConformalConic.hpp 
/** /**
* \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 "$Id: d07238fb7f335a5bca634 1c8af421bc624e41427 $" #define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP "$Id: 22e444fc38e3e8b49a56c 7a22121ddeb78c230b9 $"
#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
* projection. In this implementation, the projection correctly becomes the * projection. In this implementation, the projection correctly becomes the
* Mercator_ projection or the polar sterographic projection when the sta ndard * Mercator projection or the polar sterographic projection when the stan dard
* latitude is the equator or a pole. The accuracy of the projections is * latitude is the equator or a pole. The accuracy of the projections is
* about 10 nm. * about 10 nm.
* *
* The ellipsoid parameters, the standard parallels, and the scale on the * The ellipsoid parameters, the standard parallels, and the scale on the
* standard parallels are set in the constructor. Internally, the case w ith * standard parallels are set in the constructor. Internally, the case w ith
* two standard parallels is converted into a single standard parallel, t he * two standard parallels is converted into a single standard parallel, t he
* latitude of tangency (also the latitude of minimum scale), with a scal e * latitude of tangency (also the latitude of minimum scale), with a scal e
* specified on this parallel. This latitude is also used as the latitud e of * specified on this parallel. This latitude is also used as the latitud e of
* origin which is returned by LambertConformalConic::OriginLatitude. Th e * origin which is returned by LambertConformalConic::OriginLatitude. Th e
* scale on the latitude of origin is given by * scale on the latitude of origin is given by
skipping to change at line 339 skipping to change at line 339
/** /**
* @return central scale for the projection. This is the scale on the * @return central scale for the projection. This is the scale on the
* latitude of origin. * latitude of origin.
********************************************************************** / ********************************************************************** /
Math::real CentralScale() const throw() { return _k0; } Math::real CentralScale() const throw() { return _k0; }
///@} ///@}
/** /**
* A global instantiation of LambertConformalConic with the WGS84 * A global instantiation of LambertConformalConic with the WGS84
* ellipsoid, \e stdlat = 0, and \e k0 = 1. This degenerates to the * ellipsoid, \e stdlat = 0, and \e k0 = 1. This degenerates to the
* Mercator_ projection. * Mercator projection.
********************************************************************** / ********************************************************************** /
static const LambertConformalConic Mercator; static const LambertConformalConic Mercator;
}; };
} // namespace GeographicLib } // namespace GeographicLib
#endif // GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP #endif // GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 Math.hpp   Math.hpp 
skipping to change at line 15 skipping to change at line 15
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the MIT/X11 License. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
// Constants.hpp includes Math.hpp. Place this include outside Math.hpp's // Constants.hpp includes Math.hpp. Place this include outside Math.hpp's
// include guard to enforce this ordering. // include guard to enforce this ordering.
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if !defined(GEOGRAPHICLIB_MATH_HPP) #if !defined(GEOGRAPHICLIB_MATH_HPP)
#define GEOGRAPHICLIB_MATH_HPP "$Id: 3cbbb78592353a07832269674df0f17bb6291e 97 $" #define GEOGRAPHICLIB_MATH_HPP "$Id: 30d442ca2b676500169652c4157fd2c263a19d 6c $"
/** /**
* Are C++0X math functions available? * Are C++0X math functions available?
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CPLUSPLUS0X_MATH) #if !defined(GEOGRAPHICLIB_CPLUSPLUS0X_MATH)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) # if defined(__GXX_EXPERIMENTAL_CXX0X__)
# define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 1 # define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 1
# else # else
# define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 0 # define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 0
# endif # endif
#endif #endif
RCSID_DECL(GEOGRAPHICLIB_MATH_HPP)
#if !defined(GEOGRAPHICLIB_PREC) #if !defined(GEOGRAPHICLIB_PREC)
/** /**
* The precision of floating point numbers used in %GeographicLib. 0 means * The precision of floating point numbers used in %GeographicLib. 0 means
* float; 1 (default) means double; 2 means long double. Nearly all the * float; 1 (default) means double; 2 means long double. Nearly all the
* testing has been carried out with doubles and that's the recommended * testing has been carried out with doubles and that's the recommended
* configuration. In order for long double to be used, HAVE_LONG_DOUBLE ne eds * configuration. In order for long double to be used, HAVE_LONG_DOUBLE ne eds
* to be defined. Note that with Microsoft Visual Studio, long double is t he * to be defined. Note that with Microsoft Visual Studio, long double is t he
* same as double. * same as double.
**********************************************************************/ **********************************************************************/
#define GEOGRAPHICLIB_PREC 1 #define GEOGRAPHICLIB_PREC 1
 End of changes. 2 change blocks. 
3 lines changed or deleted 1 lines changed or added


 OSGB.hpp   OSGB.hpp 
/** /**
* \file OSGB.hpp * \file OSGB.hpp
* \brief Header for GeographicLib::OSGB class * \brief Header for GeographicLib::OSGB 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_OSGB_HPP) #if !defined(GEOGRAPHICLIB_OSGB_HPP)
#define GEOGRAPHICLIB_OSGB_HPP "$Id: 5460ecf2cc63586e97d0f4b1217816ef03fa2c bf $" #define GEOGRAPHICLIB_OSGB_HPP "$Id: 3684ee43efad2de6271c94f210458913345a10 87 $"
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/TransverseMercator.hpp> #include <GeographicLib/TransverseMercator.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)
skipping to change at line 169 skipping to change at line 169
/** /**
* Convert OSGB coordinates to a grid reference. * Convert OSGB coordinates to a grid reference.
* *
* @param[in] gridref National Grid reference. * @param[in] gridref National Grid reference.
* @param[out] x easting of point (meters). * @param[out] x easting of point (meters).
* @param[out] y northing of point (meters). * @param[out] y northing of point (meters).
* @param[out] prec precision relative to 100 km. * @param[out] prec precision relative to 100 km.
* @param[in] centerp if true (default), return center of the grid squa re, * @param[in] centerp if true (default), return center of the grid squa re,
* else return SW (lower left) corner. * else return SW (lower left) corner.
* *
* The grid reference must be of the form: two letters_ (not including * The grid reference must be of the form: two letters (not including I
I) )
* followed by an even number of digits_ (up to 22). * followed by an even number of digits (up to 22).
********************************************************************** / ********************************************************************** /
static void GridReference(const std::string& gridref, static void GridReference(const std::string& gridref,
real& x, real& y, int& prec, real& x, real& y, int& prec,
bool centerp = true); bool centerp = true);
/** \name Inspector functions /** \name Inspector functions
********************************************************************** / ********************************************************************** /
///@{ ///@{
/** /**
* @return \e a the equatorial radius of the Airy 1830 ellipsoid (meter s). * @return \e a the equatorial radius of the Airy 1830 ellipsoid (meter s).
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 PolygonArea.hpp   PolygonArea.hpp 
/** /**
* \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 "$Id: 04fcbc14351bc33fbfbef89a68cc7bd eddb33e2b $" #define GEOGRAPHICLIB_POLYGONAREA_HPP "$Id: 705d561a35fc61675a77d0d54d938c7 690763bcf $"
#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>.
* .
* See also Section 6 of
* - C. F. F. Karney,
* <a href="http://arxiv.org/abs/1109.4448">Algorithms for geodesics</a
>,
* Sept. 2011;
* preprint
* <a href="http://arxiv.org/abs/1109.4448">arxiv:1109.4448</a>.
* *
* This class lets you add vertices one at a time to the polygon. The ar ea * This class lets you add vertices one at a time to the polygon. The ar ea
* and perimeter are accumulated in two times the standard floating point * and perimeter are accumulated in two times the standard floating point
* precision to guard against the loss of accuracy with many-sided polygo ns. * precision to guard against the loss of accuracy with many-sided polygo ns.
* At any point you can ask for the perimeter and area so far. There's a n * At any point you can ask for the perimeter and area so far. There's a n
* option to treat the points as defining a polyline instead of a polygon ; in * option to treat the points as defining a polyline instead of a polygon ; in
* that case, only the perimeter is computed. * that case, only the perimeter is computed.
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT PolygonArea { class GEOGRAPHIC_EXPORT PolygonArea {
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 TransverseMercatorExact.hpp   TransverseMercatorExact.hpp 
/** /**
* \file TransverseMercatorExact.hpp * \file TransverseMercatorExact.hpp
* \brief Header for GeographicLib::TransverseMercatorExact class * \brief Header for GeographicLib::TransverseMercatorExact class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the MIT/X11 License. For more information, see * and licensed 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 "$Id: 1e7fe9ef31424d25589 2679d74ac0ae492c2334a $" #define GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP "$Id: 779cb64ba88ff77e42e 606e9b186649f78b73064 $"
#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
skipping to change at line 61 skipping to change at line 61
* method, TransverseMercator, taking about 11 us for a combined forward and * method, TransverseMercator, taking about 11 us for a combined forward and
* reverse projection on a 2.66 GHz Intel machine (g++, version 4.3.0, -O 3). * reverse projection on a 2.66 GHz Intel machine (g++, version 4.3.0, -O 3).
* *
* The ellipsoid parameters and the central scale are set in the construc tor. * The ellipsoid parameters and the central scale are set in the construc tor.
* The central meridian (which is a trivial shift of the longitude) is * The central meridian (which is a trivial shift of the longitude) is
* specified as the \e lon0 argument of the TransverseMercatorExact::Forw ard * specified as the \e lon0 argument of the TransverseMercatorExact::Forw ard
* and TransverseMercatorExact::Reverse functions. The latitude of origi n is * and TransverseMercatorExact::Reverse functions. The latitude of origi n is
* taken to be the equator. See the documentation on TransverseMercator for * taken to be the equator. See the documentation on TransverseMercator for
* how to include a false easting, false northing, or a latitude of origi n. * how to include a false easting, false northing, or a latitude of origi n.
* *
* See <a href="http://geographiclib.sourceforge.net/tm-grid.kmz"
* type="application/vnd.google-earth.kmz"> tm-grid.kmz</a>, for an
* illustration of the transverse Mercator grid in Google Earth.
*
* See TransverseMercatorExact.cpp for more information on the * See TransverseMercatorExact.cpp for more information on the
* implementation. * implementation.
* *
* See \ref transversemercator for a discussion of this projection. * See \ref transversemercator for a discussion of this projection.
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT TransverseMercatorExact { class GEOGRAPHIC_EXPORT TransverseMercatorExact {
private: private:
typedef Math::real real; typedef Math::real real;
static const real tol_; static const real tol_;
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 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/