After upgrading to GeographicLib version 1.34 or later, it's possible
that projects that compile and link to GeographicLib will get this
compiler error:
#error : GEOGRAPHICLIB_SHARED_LIB must be 0 or 1
This will only happen on non-Windows systems and is caused by cmake
finding the cmake configuration for a pre-1.34 version of GeographicLib.
The fix is to remove all earlier cmake configuration files with (as
root):... read more
Changes between 1.35 (released 2014-03-13) and 1.34 versions:
Fix blunder in UTMUPS::EncodeEPSG (found by Ben Adler).
Matlab wrapper routines geodesic{direct,inverse,line} switch to
"exact" routes if |f| > 0.02.
GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
for GeodSolve).
Set title in HTML versions of man pages for the utility programs.
Changes in cmake support:
Ben Adler found a bug in UTMUPS::EncodeEPSG. Here is the fix
diff --git a/src/UTMUPS.cpp b/src/UTMUPS.cpp index 2abf43e..ec66c1d 100644 --- a/src/UTMUPS.cpp +++ b/src/UTMUPS.cpp @@ -292,7 +292,7 @@ namespace GeographicLib { if (zone == UPS) epsg = epsgS; else if (zone >= MINUTMZONE && zone <= MAXUTMZONE) - epsg = epsg + (zone - MINUTMZONE) + epsg01S; + epsg = (zone - MINUTMZONE) + epsg01S; if (epsg >= 0 && northp) epsg += epsgN - epsgS; return epsg;... [read more](/p/geographiclib/news/2014/01/bug-in-utmupsencodeepsg--fix/)
Generalize C interface for polygon areas to allow vertices to be
specified incrementally.
Fix way flags for C++11 support are determined.
Changes breaking binary compatibility (source compatibility is
maintained):
FIX BUG in GeographicLib::GravityCircle constructor (found by
Mathieu Peyréga) which caused bogus results for the gravity
disturbance and gravity anomaly vectors. (This only affected
calculations using GravityCircle. GravityModel calculations did not
suffer from this bug.)... read more
Mathieu Peyréga found a bug in the constructor for GravityCircle which
caused bogus results for the gravity disturbance and gravity anomaly
vectors. (This only affected calculations using GravityCircle.
GravityModel calculations did not suffer from this bug.) The following
patch (which will be included in the next release) fixes the problem.
--- a/include/GeographicLib/GravityCircle.hpp
+++ b/include/GeographicLib/GravityCircle.hpp
@@ -71,7 +71,7 @@ namespace GeographicLib {
, _h(h)
, _Z(Z)
, _Px(P)
- , _invR(Math::hypot(_Px, _Z))
+ , _invR(1 / Math::hypot(_Px, _Z))
, _cpsi(_Px * _invR)
, _spsi(_Z * _invR)
, _cphi(cphi)
Changes to allow compilation with libc++ (courtesy of Kal Conley).
Add description of geodesics on triaxial ellipsoid to
documentation.
Update journal reference for "Algorithms for geodesics".
Here are the URLs for the documentation on the C and Fortran geodesic
libraries:
http://geographiclib.sourceforge.net/html/C/index.html
http://geographiclib.sourceforge.net/html/Fortran/index.html
Here an example of a triangle whose area is now computed correctly by
PolygonArea:
lat lon 9 -0.00000000000001 9 180 9 0
Previously (version 1.27 and before) the area was computed as
approximately 1/2 of the earth's area. Now (version 1.28) the area is
correctly reported as close to 0.
I've creates two mailing lists for GeographicLib
To sign up visit
https://lists.sourceforge.net/lists/listinfo/geographiclib-announce
https://lists.sourceforge.net/lists/listinfo/geographiclib-users
The documentation for GeodesicExact notes that the area is computed using a series expansion and implies that the result in accurate if b/a ∈ [1/3, 3]. This turns out to be wildly optimistic. The results are accurate to roundoff for |f| < 0.1. Reasonably accurate results may be obtained for b/a ∈ [0.8, 1.5]. Outside this range the results for the area should not be trusted at all.... read more
4analit@gmail.com noticed a typo in one of the python scripts included
with version 1.25. I've fixed this in the source tree and created new
installation packages. In case you have already downloaded version
1.25, here is the patch:
diff --git a/python/geographiclib/geodesicline.py b/python/geographiclib/geodesicline.py index 5ee15bb..371e212 100644 --- a/python/geographiclib/geodesicline.py +++ b/python/geographiclib/geodesicline.py @@ -162,7 +162,7 @@ class GeodesicLine(object): # sig2 = sig1 + sig12 ssig2 = self._ssig1 * csig12 + self._csig1 * ssig12 csig2 = self._csig1 * csig12 - self._ssig1 * ssig12 - dn2 = math.sqrt(1 + self_k2 * Math.sq(ssig2)) + dn2 = math.sqrt(1 + self._k2 * Math.sq(ssig2)) if outmask & ( Geodesic.DISTANCE | Geodesic.REDUCEDLENGTH | Geodesic.GEODESICSCALE): if arcmode:
Allow the specification of the hemisphere in UTM coordinates in
order to provide continuity across the equator:
Add UTMUPS::DecodeEPSG and UTMUPS::EncodeEPSG.
cmake changes:
begin migrating the documentation to using Greek letters where
appropriate (requires doxygen 1.8.1.2 or later).
Add Math::AngNormalize and Math::AngNormalize2; the allowed range
for longitudes and azimuths widened to [-540d, 540d).... read more
There's a bug in LambertConformalConic::Forward in versions 1.22 and
earlier which results in incorrect results being returned when the
tangent latitude is negative. This following patch fixes the problem.
This will be included in the next release.
diff --git a/src/LambertConformalConic.cpp b/src/LambertConformalConic.cpp
index 4d5af6d..0c7561d 100644
--- a/src/LambertConformalConic.cpp
+++ b/src/LambertConformalConic.cpp
@@ -343,7 +343,7 @@ namespace GeographicLib {
// and drho is evaluated with divided differences
real
lam = lon * Math::degree<real>(),
- phi = lat * Math::degree<real>(),
+ phi = sign * lat * Math::degree<real>(),
sphi = sin(phi), cphi = abs(lat) != 90 ? cos(phi) : epsx,
tphi = sphi/cphi, tbet = _fm * tphi, scbet = hyp(tbet),
scphi = 1/cphi, shxi = sinh(eatanhe(sphi)),
Add Geohash and Ellipsoid classes.
Fix bug in AlbersEqualArea of very prolate ellipsoids (b^2 > 2
a^2).
cmake changes:
GeoConvert and Geod now accept a -: option.
GeoidEval does not print the gradient of the geoid height by default
(because it's subject to large errors); give the -g option to get
the gradient printed.
Work around optimization BUG in GeographicLib::Geodesic::Inverse
with tdm mingw g++ version 4.6.1.... read more
fix cmake warning with Visual Studio Express.
Fix SphericalEngine to deal with aggessive iterator checking by
Visual Studio.
Fix transcription BUG is Geodesic.js.