Loading...
Searching...
No Matches
GeographicLib in other languages
Back to Code organization. Forward to Geoid height. Up to Contents.

Jump to

- Implementations in other languages.
- Using wrappers to invoke GeographicLib.
- Maxima routines.

# Implementations in other languages

Various subsets of GeographicLib have been implemented in other languages: C, Fortran, Python, Octave/MATLAB, Java, and JavaScript. These are described here on the main GeographicLib web page.

For the most part, these implementations focus on the geodesic capabilities of GeographicLib, i.e., the classes Geodesic, GeodesicLine, and PolygonAreaT. The exceptions are

- The Java package GeographicLib-Java includes an implementation of the Gnomonic projection
- The Octave/MATLAB package geographiclib also includes implementations of TransverseMercator, PolarStereographic, AzimuthalEquidistant, CassiniSoldner, Gnomonic, UTMUPS, MGRS, Geoid, Geocentric, LocalCartesian. In addition this package includes calculations for Great Ellipses.

# Using wrappers to invoke GeographicLib

Alternatively, it is possible to call the C++ library directly from certain other languages. Examples of this idiom are given in the wrapper directory in the source distribution.

- The C example in wrapper/c gives a small example, which converts heights above the geoid to heights above the ellipsoid.
- For JavaScript, wrapper/javascript, there is a minimal description of translating C++ source code to JavaScript.
- The Python example in wrapper/python showns how to convert heights above the geoid to heights above the ellipsoid using boost-python. An alternation is to use Cython.
- It is also possible to call the C++ version of GeographicLib directly from Octave or MATLAB. The example in wrapper/octave solves the inverse geodesic problem for ellipsoids with arbitrary flattening.
- The Excel example in wrapper/excel shows how to call the C++ library from Visual Basic which, in turn, allows the functionality to be exposed in Excel. Here computations involving geodesics and rhumb are illustrated. At present this works only on Windows systems.

# Maxima routines

Maxima is a free computer algebra system which can be downloaded from https://maxima.sourceforge.io. Maxima was used to generate the series used by TransverseMercator (tmseries.mac), Geodesic (geod.mac), Rhumb (rhumbarea.mac), The area under a great ellipse (gearea.mac), the relation between Auxiliary latitudes (auxlat.mac), and to generate accurate data for testing (tm.mac and geodesic.mac). The latter uses Maxima's bigfloat arithmetic together with series extended to high order or solutions in terms of elliptic integrals (ellint.mac). These files contain brief instructions on how to use them.

Back to Code organization. Forward to Geoid height. Up to Contents.