pygeodesy.karney

Package pygeodesy :: Module karney |
[frames] | no frames]

# Module karney

Wrapper around several `geomath.Math` functions from Karney's Python package geographiclib, provided that package is installed.

Methods of the wrapped Geodesic and GeodesicLine classes return a GDict instance offering access to the `dict` items either by `key` or by `attribute` name.

With env variable `PYGEODESY_GEOGRAPHICLIB` left undefined or set to `"2"`, modules geodesicw, geodesicx and this module will use GeographicLib 2.0+ and newer transcoding, otherwise `1.52` or older. Set `PYGEODESY_GEOGRAPHICLIB=2.4` to default to the `Jacobi amplitude` instead of `Bulirsch`' function in methods ExactTransverseMercator.forward and reverse.

# Karney-based functionality

1. The following classes and functions in `pygeodesy`
   - AlbersEqualArea, AlbersEqualArea2, AlbersEqualArea4, AlbersEqualAreaCylindrical, AlbersEqualAreaNorth, AlbersEqualAreaSouth -- AlbersEqualArea
   - Ang, Deg, Rad -- AngleT in GeographicLib 2.7.
   - AuxAngle, AuxDST, AuxDLat, AuxLat -- AuxAngle, DST, DAuxLatitude, AuxLatitude in GeographicLib 2.2+
   - CassiniSoldner -- CassiniSoldner
   - Conformal3, Conformal3B, Conformal3Sphere -- Conformal3 in GeographicLib 2.7
   - EcefKarney -- Geocentric
   - Elliptic -- EllipticFunction
   - EquidistantExact, EquidistantGeodSolve, EquidistantKarney -- AzimuthalEquidistant
   - Etm, ExactTransverseMercator -- TransverseMercatorExact
   - Geodesic, GeodesicLine -- wrapped geodesic.Geodesic, wrapped geodesicline.GeodesicLine
   - GeodesicAreaExact, PolygonArea -- PolygonArea
   - GeodesicExact, GeodesicLineExact -- GeodesicExact, GeodesicLineExact
   - GeoidKarney -- Geoid
   - Georef -- Georef
   - GnomonicExact, GnomonicGeodSolve, GnomonicKarney -- Gnomonic
   - Intersector -- Intersect from GeographicLib 2.3+
   - JacobiConformal -- JacobiConformal
   - KTransverseMercator - TransverseMercator
   - LocalCartesian, Ltp -- LocalCartesian
   - Osgr -- OSGB
   - rhumb.aux_, RhumbAux, RhumbLineAux -- Rhumb and RhumbLine from GeographicLib 2.2+
   - rhumb.ekx, Rhumb, RhumbLine -- Rhumb, RhumbLine, TransverseMercator from GeographicLib 2.0
   - Triaxial3, Triaxial3B -- Cartesian3, Ellipsoidal3 in GeographicLib 2.7
   - Ups -- PolarStereographic
   - Utm -- TransverseMercator
   - UtmUps, Epsg -- UTMUPS
   - atan1d, atan2d, sincos2, sincos2d, tand -- geomath.Math

   are transcoded from C++ classes in Karney's GeographicLib.

2. These `pygeodesy` modules and classes
   - ellipsoidalGeodSolve, ellipsoidalKarney, geodesici, geodsolve, karney, rhumb.solve
   - EquidistantKarney, FrechetKarney, GeodesicSolve, GeodesicLineSolve, Geodesic3Solve, GeodesicLine3Solve, GnomonicGeodSolve, GnomonicKarney, HeightIDWkarney, Intersectool

   are or use wrappers around Karney's Python geographiclib or C++ utility GeodSolve, Geod3Solve, IntersectTool or RhumbSolve.

3. All `pygeodesy` functions and methods to compute ellipsoidal intersections, nearest points and trilaterations
   - ellipsoidalExact.intersection3, ellipsoidalExact.intersections2, ellipsoidalExact.nearestOn, ellipsoidalExact.LatLon.intersection3, ellipsoidalExact.LatLon.intersections2, ellipsoidalExact.LatLon.nearestOn, ellipsoidalExact.LatLon.trilaterate5
   - ellipsoidalKarney.intersection3, ellipsoidalKarney.intersections2, ellipsoidalKarney.nearestOn, ellipsoidalKarney.LatLon.intersection3, ellipsoidalKarney.LatLon.intersections2, ellipsoidalKarney.LatLon.nearestOn, ellipsoidalKarney.LatLon.trilaterate5
   - ellipsoidalVincenty.intersection3, ellipsoidalVincenty.intersections2, ellipsoidalVincenty.nearestOn, ellipsoidalVincenty.LatLon.intersection3, ellipsoidalVincenty.LatLon.intersections2, ellipsoidalVincenty.LatLon.nearestOn, ellipsoidalVincenty.LatLon.trilaterate5
   - RhumbLineAux.Intersection and RhumbLine.Intersection

   are implementations of Karney's iterative solution posted under The ellipsoidal case and in paper Geodesics on an ellipsoid of revolution (pp 20-21, section 14. MARITIME BOUNDARIES).

4. The `pygeodesy` methods to compute ellipsoidal intersections and nearest points
   - RhumbLineAux.Intersecant2, RhumbLineAux.PlumbTo, RhumbLine.Intersecant2 and RhumbLine.PlumbTo

   are transcoded of Karney's iterative C++ function rhumb-intercept.

5. Spherical functions
   - pygeodesy.excessKarney_, sphericalTrigonometry.areaOf

   in `pygeodesy` are based on Karney's post Area of a spherical polygon, 3rd Answer.

Version: 25.12.23

Classes
| Area3Tuple 3-Tuple `(number, perimeter, area)` with the `number` of points of the polygon or polyline, the `perimeter` in `meter` and the `area` in `meter` squared.
| Caps Enum-style masks to be bit-`or`'ed to specify `geodesic`, `rhumb` or `-lines` capabilities (`caps`) and method results (`outmask`).
| _CapsBase (INTERNAL) Base class for `Geodesic*`, `Geodesic*Exact`, `Intersectool` and `Rhumb*Base`.
| Direct9Tuple 9-Tuple `(a12, lat2, lon2, azi2, s12, m12, M12, M21, S12)` with arc length `a12`, angles `lat2`, `lon2` and azimuth `azi2` in `degrees`, distance `s12` and reduced length `m12` in `meter` and area `S12` in `meter` squared.
| GDict A `dict` with both `key` and `attribute` access to the `dict` items.
| Inverse10Tuple 10-Tuple `(a12, s12, salp1, calp1, salp2, calp2, m12, M12, M21, S12)` with arc length `a12` in `degrees`, distance `s12` and reduced length `m12` in `meter`, area `S12` in `meter` squared and the sines `salp1`, `salp2` and cosines `calp1`, `calp2` of the initial `1` and final `2` (forward) azimuths.

Variables
| __all__ = `_ALL_LAZY.karney`