geographiclib

MATLAB implementations of a subset of the C++ library, GeographicLib
4.6K Downloads
Updated 5 Oct 2024

View License

GeographicLib toolbox
Version 2.3.1 2024-08-27
Native Octave/MATLAB implementations of a subset of the C++ library, GeographicLib. Key components of this toolbox are:
  • Geodesics, direct, inverse, area calculations.
  • Projections, transverse Mercator, polar stereographic, etc.
  • Grid systems, UTM, UPS, MGRS.
  • Geoid lookup, egm84, egm96, egm2008 geoids supported.
  • Geometric transformations, geocentric, local cartesian.
  • Great ellipse, direct, inverse, area calculations.
  • Geodesics and coordinate conversions on a triaxial ellipsoid.
(The last two items are not present in the C++ library.) All the functions are vectorized and so offer speeds comparable to compiled C++ code when operating on arrays.
Full documentation is available on github. This page gives more details on the routines for triaxial ellipsoids.

Cite As

Charles Karney (2024). geographiclib (https://www.mathworks.com/matlabcentral/fileexchange/50605-geographiclib), MATLAB Central File Exchange. Retrieved .

Karney, Charles F. F. “Algorithms for Geodesics.” Journal of Geodesy, vol. 87, no. 1, Springer Science and Business Media LLC, June 2012, pp. 43–55, doi:10.1007/s00190-012-0578-z.

View more styles
MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
2.3.2

Version 2.3.2 (released 2024-10-05)
* Fix indexing bug in geodreckon.
* Fix various breakages in triaxial.demo.

2.3.1

* Bug fix: replace signbit by signbitx in geocent_inv and
cassini_fwd.
* Minor fix to @triaxial/accel.

2.3

Bug fixes and other improvement in the code for triaxial ellipsoids. See https://github.com/geographiclib/geographiclib-octave/blob/main/NEWS

2.2.2

Fix the upload bundle. This is really version 2.2.

2.2.1

Version 2.2, 2024-04-04: Add triaxial class to solve problems on a
triaxial ellipsoid. The class includes (a) the solution of the direct
and inverse geodesic problem, (b) conversions between various
coordinate systems.

2.2

Add a class, triaxial, to solve problems on a triaxial ellipsoid. The
class includes (a) the solution of the direct and inverse geodesic
problem, (b) conversions between various coordinate systems.

2.1

Version 2.1 (released 2024-04-06)
* The ellipsoid returned by defaultellipsoid can now be set.
* Relax overly strict convergence test in geoddistance.

2.0

A bug fix, better vectorization in geodreckon; better treatment of +/-0. For details, see https://github.com/geographiclib/geographiclib-octave/blob/main/NEWS

1.52

geoddistance: be more aggressive in preventing negative s12 and m12 for short lines.

1.50

geodarea can now handle arbitrarily complex polygons.
Fix bug in mgrs_inv which resulted in incorrect results for UPS zones with prec = -1.
In geodreckon.m and geoddistance.m, suppress (innocuous) "warning: division by zero" messages from Octave.

1.49

Update to version 1.49

1.48.0.0

Fix BUGS in geodreckon with mixed scalar and array arguments.
Default range for longitude and azimuth is (-180d, 180d].

1.47.0.0

Improve accuracy of area calculation (fixing a flaw introduced in version 1.46).
Fix vectorization of copysignx for MATLAB (Octave was already OK).

1.46.0.0

Improve the accuracy of the solution of the inverse problem when the
longitude difference is close to 180deg.

1.45.0.0

Synchronize with GeographicLib 1.45.
tranmerc_{fwd,inv} works with mixed scalar+array args.
couple of Octave-specific fixes.
array mismatch fix for geoddistance

1.44.1.0

Fix obscure bug in geoddistance (apply to Octave only).

1.44.0.0

Synchronize with GeographicLib 1.44.

1.43.0.0

Synchronize with GeographicLib 1.43.
Fix bug in the long_unroll feature of geodreckon.
mgrs_inv now takes an optional center argument.

1.42.1.0

Version 1.42.1 Repackage as a toolbox to eliminate spurious dependency. No change in .m files.

1.6.0.0

Reverting to zip packaging. MATLAB Central produces a garbled zip file
when submitting a mltbx file.

1.4.0.0

Sync with GeographicLib 1.42. Minor changes to documentation only.

1.3.0.0

Remove bogus dependency on Robust Control Toolbox (yet again!).

1.2.0.0

Remove bogus dependency on Robust Control Toolbox (again!).

1.1.0.0

Remove bogus required product.

1.0.0.0