Package pygeodesy :: Package geodesicx :: Module gx :: Class GeodesicExact |
[frames] | no frames]

# Class GeodesicExact

       object --+
                |
     named._Named --+
                    |
     named._NamedBase --+
                        |
    gxbases._GeodesicBase --+
                            |
                           GeodesicExact

A pure Python version of Karney's C++ class GeodesicExact, modeled after Karney's Python class Geodesic.

Instance Methods
__init__(self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.`...`, f=None, name='', C4Order=None) New GeodesicExact instance. |
ArcDirect(self, lat1, lon1, azi1, a12, outmask=3968) Solve the Direct geodesic problem in terms of (spherical) arc length. |
ArcDirectLine(self, lat1, lon1, azi1, a12, caps) Define an GeodesicLineExact in terms of the direct geodesic problem and as arc length. |
Area(self, polyline=False, name='') Set up an GeodesicAreaExact to compute area and perimeter of a polygon. |
Polygon(self, polyline=False, name='') Set up an GeodesicAreaExact to compute area and perimeter of a polygon. |
C4f(self, eps) Evaluate the `C4x` coefficients for `eps`. |
Direct(self, lat1, lon1, azi1, s12, outmask=3968) Solve the Direct geodesic problem |
Direct3(self, lat1, lon1, azi1, s12) Return the destination lat, lon and reverse azimuth (final bearing) in `degrees`. |
DirectLine(self, lat1, lon1, azi1, s12, caps=3968) Define a {GeodesicLineExact} in terms of the direct geodesic problem and as distance. |
Inverse(self, lat1, lon1, lat2, lon2, outmask=3968) Perform the Inverse geodesic calculation. |
Inverse1(self, lat1, lon1, lat2, lon2, wrap=False) Return the non-negative, angular distance in `degrees`. |
Inverse3(self, lat1, lon1, lat2, lon2) Return the distance in `meter` and the forward and reverse azimuths (initial and final bearing) in `degrees`. |
InverseLine(self, lat1, lon1, lat2, lon2, caps=3968) Define a {GeodesicLineExact} in terms of the Inverse geodesic problem. |
Line(self, lat1, lon1, azi1, caps=32640) Set up an GeodesicLineExact to compute several points on a single geodesic. |
toStr(self, prec=6, sep=', ', **unused) Return this `GeodesicExact` as string. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
Inherited from `gxbases._GeodesicBase`: `ALL`, `AREA`, `AZIMUTH`, `DISTANCE`, `DISTANCE_IN`, `EMPTY`, `GEODESICSCALE`, `LATITUDE`, `LONGITUDE`, `LONG_UNROLL`, `REDUCEDLENGTH`, `STANDARD`

Properties
| a Get the equatorial radius, semi-axis (`meter`).
| b Get the ellipsoid's polar radius, semi-axis (`meter`).
| c2x Get the ellipsoid's authalic earth radius squared (`meter**2`).
| c2 Get the ellipsoid's authalic earth radius squared (`meter**2`).
| C4Order Get the series expansion order (`int`, 24, 27 or 30).
| e2 Get the ellipsoid's (1st) eccentricity squared (`float`), f * (2 - f).
| ellipsoid Get the ellipsoid (`Ellipsoid`).
| ep2 Get the ellipsoid's 2nd eccentricity squared (`float`), e2 / (1 - e2).
| f Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate.
| flattening Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate.
| f1 Get the ellipsoid's ratio polar over equatorial radius (`float`), b / a == 1 - f.
| n Get the ellipsoid's 3rd flattening (`float`), f / (2 - f) == (a - b) / (a + b).
Inherited from `gxbases._GeodesicBase`: `debug` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.`...`, f=None, name='', C4Order=None) (Constructor) |
New GeodesicExact instance. Arguments: `a_ellipsoid` - An ellipsoid (Ellipsoid) or datum (datum) the equatorial radius of the ellipsoid (`meter`), see `f`. `f` - The flattening of the ellipsoid (`scalar`) if `a_ellipsoid` is specified as `meter`. `name` - Optional name (`str`). `C4Order` - Optional series expansion order (`int`), see property C4Order, default `30`. Raises: `GeodesicError` - Invalid `C4Order`. Overrides: object.__init__

### ArcDirect (self, lat1, lon1, azi1, a12, outmask=3968) |
Solve the Direct geodesic problem in terms of (spherical) arc length. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `azi1` - Azimuth at the first point (compass `degrees`). `a12` - Arc length between the points (`degrees`), can be negative. `outmask` - Bit-or'ed combination of Caps values specifying the quantities to be returned. Returns: A `dict` with up to 12 items `lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12` with `lat1`, `lon1`, `azi1` and arc length `a12` always included. See Also: C++ GeodesicExact.ArcDirect and Python Geodesic.ArcDirect.

### ArcDirectLine (self, lat1, lon1, azi1, a12, caps) |
Define an GeodesicLineExact in terms of the direct geodesic problem and as arc length. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `azi1` - Azimuth at the first point (compass `degrees`). `a12` - Arc length between the points (`degrees`), can be negative. `caps` - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition. Returns: A GeodesicLineExact instance. Notes: The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem. Latitude `lat1` should in the range `[-90, +90]`. See Also: C++ GeodesicExact.ArcDirectLine and Python Geodesic.ArcDirectLine.

### Area (self, polyline=False, name='') |
Set up an GeodesicAreaExact to compute area and perimeter of a polygon. Arguments: `polyline` - If `True` perimeter only, otherwise area and perimeter (`bool`). `name` - Optional name (`str`). Returns: A GeodesicAreaExact instance. Note: The `debug` setting is passed as `verbose` to the returned GeodesicAreaExact instance.

### Polygon (self, polyline=False, name='') |
Set up an GeodesicAreaExact to compute area and perimeter of a polygon. Arguments: `polyline` - If `True` perimeter only, otherwise area and perimeter (`bool`). `name` - Optional name (`str`). Returns: A GeodesicAreaExact instance. Note: The `debug` setting is passed as `verbose` to the returned GeodesicAreaExact instance.

### C4f (self, eps) |
Evaluate the `C4x` coefficients for `eps`. Arguments: `eps` - Polynomial factor (`float`). Returns: `C4Order`-Tuple of `C4x(eps)` coefficients.

### Direct (self, lat1, lon1, azi1, s12, outmask=3968) |
Solve the Direct geodesic problem Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `azi1` - Azimuth at the first point (compass `degrees`). `s12` - Distance between the points (`meter`), can be negative. `outmask` - Bit-or'ed combination of Caps values specifying the quantities to be returned. Returns: A `dict` with up to 12 items `lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12` with `lat1`, `lon1`, `azi1` and distance `s12` always included. See Also: C++ GeodesicExact.Direct and Python Geodesic.Direct.

### Direct3 (self, lat1, lon1, azi1, s12) |
Return the destination lat, lon and reverse azimuth (final bearing) in `degrees`. Returns: Destination3Tuple`(lat, lon, final)`.

### DirectLine (self, lat1, lon1, azi1, s12, caps=3968) |
Define a {GeodesicLineExact} in terms of the direct geodesic problem and as distance. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `azi1` - Azimuth at the first point (compass `degrees`). `s12` - Distance between the points (`meter`), can be negative. `caps` - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position. Returns: A GeodesicLineExact instance. Notes: The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem. Latitude `lat1` should in the range `[-90, +90]`. See Also: C++ GeodesicExact.DirectLine and Python Geodesic.DirectLine.

### Inverse (self, lat1, lon1, lat2, lon2, outmask=3968) |
Perform the Inverse geodesic calculation. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `lat2` - Latitude of the second point (`degrees`). `lon2` - Longitude of the second point (`degrees`). `outmask` - Bit-or'ed combination of Caps values specifying the quantities to be returned. Returns: A `dict` with up to 12 items `lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12` with `lat1`, `lon1`, `azi1` and distance `s12` always included. Notes: The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem. Both `lat1` and `lat2` should in the range `[-90, +90]`. See Also: C++ GeodesicExact.InverseLine and Python Geodesic.InverseLine.

### Inverse3 (self, lat1, lon1, lat2, lon2) |
Return the distance in `meter` and the forward and reverse azimuths (initial and final bearing) in `degrees`. Returns: Distance3Tuple`(distance, initial, final)`.

### InverseLine (self, lat1, lon1, lat2, lon2, caps=3968) |
Define a {GeodesicLineExact} in terms of the Inverse geodesic problem. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `lat2` - Latitude of the second point (`degrees`). `lon2` - Longitude of the second point (`degrees`). `caps` - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition. Returns: A GeodesicLineExact instance. Notes: The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem. Both `lat1` and `lat2` should in the range `[-90, +90]`. See Also: C++ GeodesicExact.InverseLine and Python Geodesic.InverseLine.

### Line (self, lat1, lon1, azi1, caps=32640) |
Set up an GeodesicLineExact to compute several points on a single geodesic. Arguments: `lat1` - Latitude of the first point (`degrees`). `lon1` - Longitude of the first point (`degrees`). `azi1` - Azimuth at the first point (compass `degrees`). `caps` - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returnedby calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition. Returns: A GeodesicLineExact instance. Note: If the point is at a pole, the azimuth is defined by keeping `lon1` fixed, writing `lat1 = ±(90 − ε)`, and taking the limit `ε → 0+`. See Also: C++ GeodesicExact.Line and Python Geodesic.Line.

### toStr (self, prec=6, sep=', ', **unused) |
Return this `GeodesicExact` as string. Arguments: `prec` - The `float` precision, number of decimal digits (0..9). Trailing zero decimals are stripped for `prec` values of 1 and above, but kept for negative `prec` values. `sep` - Optional separator to join (`str`). Returns: Tuple items (`str`). Overrides: named._Named.toStr

Property Details

### a Get the equatorial radius, semi-axis (`meter`). Get method: a(self) - Get the equatorial radius, semi-axis (`meter`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### b Get the ellipsoid's polar radius, semi-axis (`meter`). Get method: b(self) - Get the ellipsoid's polar radius, semi-axis (`meter`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### c2x Get the ellipsoid's authalic earth radius squared (`meter**2`). Get method: c2x(self) - Get the ellipsoid's authalic earth radius squared (`meter**2`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### c2 Get the ellipsoid's authalic earth radius squared (`meter**2`). Get method: c2x(self) - Get the ellipsoid's authalic earth radius squared (`meter**2`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### C4Order Get the series expansion order (`int`, 24, 27 or 30). Get method: C4Order(self) - Get the series expansion order (`int`, 24, 27 or 30). Set method: C4Order(self, order) - Set the series expansion order. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### e2 Get the ellipsoid's (1st) eccentricity squared (`float`), f * (2 - f). Get method: e2(self) - Get the ellipsoid's (1st) eccentricity squared (`float`), f * (2 - f). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### ellipsoid Get the ellipsoid (`Ellipsoid`). Get method: ellipsoid(self) - Get the ellipsoid (`Ellipsoid`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### ep2 Get the ellipsoid's 2nd eccentricity squared (`float`), e2 / (1 - e2). Get method: ep2(self) - Get the ellipsoid's 2nd eccentricity squared (`float`), e2 / (1 - e2). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### f Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate. Get method: f(self) - Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### flattening Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate. Get method: f(self) - Get the ellipsoid's flattening (`float`), (a - b) / a, `0` for spherical, negative for prolate. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### f1 Get the ellipsoid's ratio polar over equatorial radius (`float`), b / a == 1 - f. Get method: f1(self) - Get the ellipsoid's ratio polar over equatorial radius (`float`), b / a == 1 - f. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### n Get the ellipsoid's 3rd flattening (`float`), f / (2 - f) == (a - b) / (a + b). Get method: n(self) - Get the ellipsoid's 3rd flattening (`float`), f / (2 - f) == (a - b) / (a + b). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.