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.

The wrapped class methods 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"`, this module, pygeodesy.geodesicw and pygeodesy.geodesicx will use GeographicLib 2.0 transcoding, otherwise `1.52` or older.

# Karney-based functionality

1. The following classes and functions in `pygeodesy`
   - AlbersEqualArea, AlbersEqualArea2, AlbersEqualArea4, AlbersEqualAreaCylindrical, AlbersEqualAreaNorth, AlbersEqualAreaSouth -- AlbersEqualArea
   - CassiniSoldner -- CassiniSoldner
   - 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
   - JacobiConformal -- JacobiConformal
   - KTransverseMercator - TransverseMercator
   - LocalCartesian, Ltp -- LocalCartesian
   - Osgr -- OSGB.
   - Rhumb, RhumbLine -- Rhumb, RhumbLine, TransverseMercator
   - Ups -- PolarStereographic
   - Utm -- TransverseMercator
   - UtmUps, Epsg -- UTMUPS
   - pygeodesy.atand, pygeodesy.atan2d, pygeodesy.sincos2, pygeodesy.sincos2d, pygeodesy.tand -- geomath.Math

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

2. These `pygeodesy` modules and classes
   - ellipsoidalGeodSolve, ellipsoidalKarney, geodsolve, karney, rhumbsolve
   - EquidistantKarney, FrechetKarney, GeodesicSolve, GeodesicLineSolve, GnomonicGeodSolve, GnomonicKarney, HeightIDWkarney

   are or use wrappers around Karney's Python geographiclib `geodesic`, C++ utility GeodSolve or C++ utility 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
   - RhumbLine.intersection2, RhumbLine.nearestOn4

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

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

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

Version: 23.06.04

Classes
| Area3Tuple 3-Tuple `(number, perimeter, area)` with the `number` of points on the polygon or polyline, the `perimeter` in `meter` and the `area` in `meter` squared.
| _CapsBase (INTERNAL) Base class for `[_]Geodesic*Exact`.
| 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 Basic `dict` with both key and attribute access to the `dict` items.
| GeodesicError Error raised for pygeodesy.geodesicx lack of convergence or other pygeodesy.geodesicx or pygeodesy.karney issues.
| 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` foward azimuths.

Variables
| __all__ = `_ALL_LAZY.karney`
| Caps = `Caps()` Enum-style masks to be bit-`or`'ed to specify geodesic or rhumb capabilities (`caps`) and expected results (`outmask`).

Variables Details

  ### Caps Enum-style masks to be bit-`or`'ed to specify geodesic or rhumb capabilities (`caps`) and expected results (`outmask`). `AREA` - compute area `S12`, `AZIMUTH` - include azimuths `azi1` and `azi2`, `DISTANCE` - compute distance `s12`, `DISTANCE_IN` - allow distance `s12` in `.Direct`, `EMPTY` - nothing, formerly aka `NONE`, `GEODESICSCALE` - compute geodesic scales `M12` and `M21`, `LINE_OFF` - Line without updates from parent geodesic or rhumb. `LATITUDE` - compute latitude `lat2`, `LONGITUDE` - compute longitude `lon2`, `LONG_UNROLL` - unroll `lon2` in `.Direct`, `REDUCEDLENGTH` - compute reduced length `m12`, `REVERSE2` - reverse `azi2`, and `ALL` - all of the above. `STANDARD` = `AZIMUTH | DISTANCE | DISTANCE_IN | LATITUDE | LONGITUDE` Value:
      Caps()