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

# Class GeodesicExact

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

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

Instance Methods
__init__(self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223`...`, f=None, C4order=None, **name_C4Order) New GeodesicExact instance. |
ArcDirect(self, lat1, lon1, azi1, a12, outmask=1929) Solve the Direct geodesic problem in terms of (spherical) arc length. |
ArcDirectLine(self, lat1, lon1, azi1, a12, caps=32671, **name) Define a GeodesicLineExact in terms of the direct geodesic problem and as arc length. |
Area(self, polyline=False, **name) Set up a GeodesicAreaExact to compute area and perimeter of a polygon. |
C4f(self, eps) Evaluate the `C4x` coefficients for `eps`. |
Direct(self, lat1, lon1, azi1, s12=0, outmask=1929) 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=1929, **name) Define a GeodesicLineExact in terms of the direct geodesic problem and as distance. |
Inverse(self, lat1, lon1, lat2, lon2, outmask=1929) 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=1929, **name) Define a GeodesicLineExact in terms of the Inverse geodesic problem. |
Line(self, lat1, lon1, azi1, caps=32671, **name) Set up a GeodesicLineExact to compute several points on a single geodesic. |
Polygon(self, polyline=False, **name) Set up a GeodesicAreaExact to compute area and perimeter of a polygon. |
toStr(self, **prec_sep_name) Return this `GeodesicExact` as string. |
Inherited from `karney._CapsBase`: `caps_` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
Inherited from `karney._CapsBase`: `ALL`, `AREA`, `AZIMUTH`, `DISTANCE`, `DISTANCE_IN`, `EMPTY`, `GEODESICSCALE`, `LATITUDE`, `LINE_CAPS`, `LINE_OFF`, `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` squared).
| c2 Get the ellipsoid's authalic earth radius squared (`meter` squared).
| C4order Get the series expansion order (`int`, 24, 27 or 30).
| C4Order DEPRECATED, use property `C4order`.
| datum Get the datum (`Datum`).
| 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).
| e22 Get the ellipsoid's 2nd eccentricity squared (`float`), e2 / (1 - e2).
| flattening Get the `ellipsoid`'s flattening (`scalar`), (a - b) / a, `0` for spherical, negative for prolate.
| f Get the `ellipsoid`'s flattening (`scalar`), (a - b) / a, `0` for spherical, negative for prolate.
| f1 Get the `ellipsoid`'s 1 - flattening (`float`).
| n Get the `ellipsoid`'s 3rd flattening (`scalar`), f / (2 - f) == (a - b) / (a + b).
Inherited from `karney._CapsBase`: `caps`, `debug` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223`...`, f=None, C4order=None, **name_C4Order) (Constructor) |
New GeodesicExact instance. Arguments: `a_ellipsoid` - An ellipsoid (Ellipsoid) or datum (Datum) or the equatorial radius of the ellipsoid (`scalar`, conventionally in `meter`), see `f`. `f` - The flattening of the ellipsoid (`scalar`) if `a_ellipsoid` is specified as `scalar`. `C4order` - Optional series expansion order (`int`), see property C4order, default `30`. `name_C4Order` - Optional `name=NN` (`str`) and the DEPRECATED keyword argument `C4Order`, use `C4order` instead. Raises: `GeodesicError` - Invalid `C4order`. Overrides: object.__init__

### ArcDirect (self, lat1, lon1, azi1, a12, outmask=1929) |
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 GDict 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=32671, **name) |
Define a 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. `name` - Optional `name=NN` (`str`). 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 a GeodesicAreaExact to compute area and perimeter of a polygon. Arguments: `polyline` - If `True` perimeter only, otherwise area and perimeter (`bool`). `name` - Optional `name=NN` (`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=0, outmask=1929) |
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 GDict 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=1929, **name) |
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. `name` - Optional `name=NN` (`str`). 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=1929) |
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 GDict 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.

### Inverse1 (self, lat1, lon1, lat2, lon2, wrap=False) |
Return the non-negative, angular distance in `degrees`. Arguments: `wrap` - If `True`, wrap or normalize and unroll `lat2` and `lon2` (`bool`).

### 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=1929, **name) |
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. `name` - Optional `name=NN` (`str`). 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=32671, **name) |
Set up a 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. `name` - Optional `name=NN` (`str`). 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.

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

### toStr (self, **prec_sep_name) |
Return this `GeodesicExact` as string. Returns: `GeodesicExact` (`str`). Overrides: named._Named.toStr See Also: Ellipsoid.toStr for further details.

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` squared). Get method: c2x(self) - Get the ellipsoid's authalic earth radius squared (`meter` squared). 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` squared). Get method: c2x(self) - Get the ellipsoid's authalic earth radius squared (`meter` squared). 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 (`int`, 24, 27 or 30). Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### C4Order DEPRECATED, use property `C4order`. Get method: C4Order(self) - DEPRECATED, use property `C4order`. Set method: C4Order(self, order) - DEPRECATED, use property `C4order`.

### datum Get the datum (`Datum`). Get method: datum(self) - Get the datum (`Datum`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. 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.

### e22 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.

### flattening Get the `ellipsoid`'s flattening (`scalar`), (a - b) / a, `0` for spherical, negative for prolate. Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`), (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.

### f Get the `ellipsoid`'s flattening (`scalar`), (a - b) / a, `0` for spherical, negative for prolate. Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`), (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 1 - flattening (`float`). Get method: f1(self) - Get the `ellipsoid`'s 1 - flattening (`float`). 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 (`scalar`), f / (2 - f) == (a - b) / (a + b). Get method: n(self) - Get the `ellipsoid`'s 3rd flattening (`scalar`), 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.