Module geodesy.geodesic
Find shortest routes and distances along a reference ellipsoid.
Use the inverse operation when you know two geographic positions and
want their shortest surface distance and bearings. Use the direct operation
when you know a start position, a bearing and a distance and want the
destination. A prepared Geodesic solver lets you reuse the same
ellipsoid for many calculations.
The numerical solver follows Karney's geodesic method and handles difficult cases such as near-antipodal points and polar routes within its domain.
Domain
Prepared solvers support a > 0 and -0.01 <= f <= 0.01, including
prolate, spherical, and oblate ellipsoids. Positions are surface GeographicCoordinate values; no datum
or CRS identity is embedded.
Units
Returned distances use the same linear unit as the ellipsoid semi-major
axis. Azimuths use strong Angle values.
Numerics
The implementation follows Karney's geodesic formulation with scalar-dependent working precision and series order. Public float calculations use promoted double working precision.
Performance
Geodesic prepares reusable ellipsoid-dependent coefficients once for
repeated direct and inverse operations. Checked numerical operations are
allocation-free.
Validation
Accepted through analytical/special-case tests, deterministic corpora, published/high-precision reference data, and differential comparison with GeographicLib geodesic implementations and PROJ as appropriate.
See Also
Geodesic, GeodesicDirectResult, GeodesicInverseResult,
GeodesicQuantities, GeographicCoordinate
Date
September 26, 2026
Structs
| Name | Description |
|---|---|
Geodesic
|
Prepared direct/inverse geodesic solver for one reference ellipsoid. |
GeodesicDirectResult
|
Destination and arrival heading after following a geodesic. |
GeodesicInverseResult
|
Shortest surface distance and travel directions between two positions. |
GeodesicLine
|
Find many positions along one geodesic route without repeating setup. |
GeodesicLineUnrolledResult
|
Position along a geodesic with longitude allowed to pass beyond 180 degrees. |
GeodesicQuantities
|
Differential and area quantities for one oriented geodesic segment. |