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

# Class EcefKarney

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

Conversion between geodetic and geocentric, Earth-Centered, Earth-Fixed (ECEF) coordinates transcoded from Karney's C++ Geocentric methods.

Note: On methods `.forward` and `.forwar_`, let `v` be a unit vector located at `(lat, lon, h)`. We can express `v` as column vectors in one of two ways, `v1` in East, North, Up (ENU) coordinates (where the components are relative to a local coordinate system at `C(lat0, lon0, h0)`) or as `v0` in geocentric `x, y, z` coordinates. Then, v0 = M ⋅ v1 where `M` is the rotation matrix.

Instance Methods
reverse(self, xyz, y=None, z=None, M=False, **lon00_name) Convert from geocentric `(x, y, z)` to geodetic `(lat, lon, height)`. |
Inherited from `_EcefBase`: `__eq__`, `__init__`, `forward`, `forward_`, `toStr` 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__`

Properties
| hmax Get the distance or height limit (`meter`, conventionally).
Inherited from `_EcefBase`: `a`, `datum`, `ellipsoid`, `equatoradius`, `equatorialRadius`, `f`, `flattening`, `lon00` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### reverse (self, xyz, y=None, z=None, M=False, **lon00_name) |
Convert from geocentric `(x, y, z)` to geodetic `(lat, lon, height)`. Arguments: `xyz` - A geocentric (`Cartesian`, Ecef9Tuple) or `scalar` ECEF `x` coordinate (`meter`). `y` - ECEF `y` coordinate for `scalar` `xyz` and `z` (`meter`). `z` - ECEF `z` coordinate for `scalar` `xyz` and `y` (`meter`). `M` - Optionally, return the rotation EcefMatrix (`bool`). `lon00_name` - Optional `name=NN` (`str`) and optional keyword argument `lon00=INT0` (`degrees`), an arbitrary "polar" longitude returned if `x=0` and `y=0`, see property `lon00`. Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with geodetic coordinates `(lat, lon, height)` for the given geocentric ones `(x, y, z)`, case `C`, optional `M` (EcefMatrix) and `datum` if available. Raises: `EcefError` - Invalid `xyz` or `scalar` `x` or `y` and/or `z` not `scalar` for `scalar` `xyz`. Overrides: _EcefBase.reverse Note: In general, there are multiple solutions and the result which minimizes `height` is returned, i.e., the `(lat, lon)` corresponding to the closest point on the ellipsoid. If there are still multiple solutions with different latitudes (applies only if `z` = 0), then the solution with `lat` > 0 is returned. If there are still multiple solutions with different longitudes (applies only if `x` = `y` = 0), then `lon00` is returned. The returned `lon` is in the range [−180°, 180°] and `height` is not below −E.a * (1 − E.e2) / sqrt(1 − E.e2 * sin(lat)**2). Like `forward` above, v1 = Transpose(M) ⋅ v0.

Property Details

### hmax Get the distance or height limit (`meter`, conventionally). Get method: hmax(self) - Get the distance or height limit (`meter`, conventionally). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.