pygeodesy.ecef._EcefBase

Package pygeodesy :: Module ecef :: Class _EcefBase |
[frames] | no frames]

# Class _EcefBase

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
                      _EcefBase

Known Subclasses:
  - EcefKarney
  - , EcefFarrell21
  - , EcefFarrell22
  - , EcefSudano
  - , EcefUPC
  - , EcefVeness
  - , EcefYou

(INTERNAL) Base class for `Ecef*` conversion classes.

Instance Methods
__init__(self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223`...`, f=None, lon00=0, **name) New `Ecef*` converter. |
__eq__(self, other) Compare this and an other Ecef. |
forward(self, latlonh, lon=None, height=0, M=False, **name) Convert from geodetic `(lat, lon, height)` to geocentric `(x, y, z)`. |
forward_(self, phi, lam, height=0, M=False, **name) Like method `.forward` except with geodetic lat- and longitude given in radians. |
reverse(self, xyz, y=None, z=None, M=False, **tol_lon00_name) Must be overloaded. |
toStr(self, prec=9, **unused) Return this `Ecef*` as a string. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| datum Get the datum (Datum).
| ellipsoid Get the ellipsoid (Ellipsoid or Ellipsoid2).
| equatoradius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| equatorialRadius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| a Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`).
| flattening Get the `ellipsoid`'s flattening (`scalar`), positive for oblate, negative for prolate or `0` for near-spherical.
| f Get the `ellipsoid`'s flattening (`scalar`), positive for oblate, negative for prolate or `0` for near-spherical.
| lon00 Get the "polar" longitude (`degrees`), see method `reverse`.
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223`...`, f=None, lon00=0, **name) (Constructor) |
New `Ecef*` converter. Arguments: `a_ellipsoid` - A (non-prolate) ellipsoid (Ellipsoid, Ellipsoid2, Datum or a_f2Tuple) or `scalar` ellipsoid's equatorial radius (`meter`). `f` - `None` or the ellipsoid flattening (`scalar`), required for `scalar` `a_ellipsoid`, `f=0` represents a sphere, negative `f` a prolate ellipsoid. `lon00` - An arbitrary, "polar" longitude (`degrees`), see the `reverse` method. `name` - Optional `name=NN` (`str`). Raises: `EcefError` - If `a_ellipsoid` not Ellipsoid, Ellipsoid2, Datum or a_f2Tuple or `scalar` or `f` not `scalar` or if `scalar` `a_ellipsoid` not positive or `f` not less than 1.0. Overrides: object.__init__

### __eq__ (self, other) (Equality operator) |
Compare this and an other Ecef. Arguments: `other` - The other ecef (`Ecef*`). Returns: `True` if equal, `False` otherwise.

### forward (self, latlonh, lon=None, height=0, M=False, **name) |
Convert from geodetic `(lat, lon, height)` to geocentric `(x, y, z)`. Arguments: `latlonh` - Either a `LatLon`, an Ecef9Tuple or `scalar` latitude (`degrees`). `lon` - Optional `scalar` longitude for `scalar` `latlonh` (`degrees`). `height` - Optional height (`meter`), vertically above (or below) the surface of the ellipsoid. `M` - Optionally, return the rotation EcefMatrix (`bool`). `name` - Optional `name=NN` (`str`). Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with geocentric `(x, y, z)` coordinates for the given geodetic ones `(lat, lon, height)`, case `C` 0, optional `M` (EcefMatrix) and `datum` if available. Raises: `EcefError` - If `latlonh` not `LatLon`, Ecef9Tuple or `scalar` or `lon` not `scalar` for `scalar` `latlonh` or `abs(lat)` exceeds 90°. Note: Use method `.forward_` to specify `lat` and `lon` in `radians` and avoid double angle conversions.

### forward_ (self, phi, lam, height=0, M=False, **name) |
Like method `.forward` except with geodetic lat- and longitude given in radians. Arguments: `phi` - Latitude in radians (`scalar`). `lam` - Longitude in radians (`scalar`). `height` - Optional height (`meter`), vertically above (or below) the surface of the ellipsoid. `M` - Optionally, return the rotation EcefMatrix (`bool`). `name` - Optional `name=NN` (`str`). Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with `lat` set to `degrees90(phi)` and `lon` to `degrees180(lam)`. Raises: `EcefError` - If `phi` or `lam` invalid or not `scalar`.

### toStr (self, prec=9, **unused) |
Return this `Ecef*` as a string. Arguments: `prec` - Precision, number of decimal digits (0..9). Returns: This `Ecef*` (`str`). Overrides: named._Named.toStr

Property Details

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

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

### equatoradius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`). Get method: equatoradius(self) - Get the `ellipsoid`'s 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.

### equatorialRadius Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`). Get method: equatoradius(self) - Get the `ellipsoid`'s 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.

### a Get the `ellipsoid`'s equatorial radius, semi-axis (`meter`). Get method: equatoradius(self) - Get the `ellipsoid`'s 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.

### flattening Get the `ellipsoid`'s flattening (`scalar`), positive for oblate, negative for prolate or `0` for near-spherical. Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`), positive for oblate, negative for prolate or `0` for near-spherical. 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`), positive for oblate, negative for prolate or `0` for near-spherical. Get method: flattening(self) - Get the `ellipsoid`'s flattening (`scalar`), positive for oblate, negative for prolate or `0` for near-spherical. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### lon00 Get the "polar" longitude (`degrees`), see method `reverse`. Get method: lon00(self) - Get the "polar" longitude (`degrees`), see method `reverse`. Set method: lon00(self, lon00) - Set the "polar" longitude (`degrees`), see method `reverse`.