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