Coverage for pygeodesy/ltpTuples.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
Local coordinate classes L{XyzLocal}, L{Enu}, L{Ned} and L{Aer} and local coordinate tuples L{Local9Tuple}, L{Xyz4Tuple}, L{Enu4Tuple}, L{Ned4Tuple}, L{Aer4Tuple} and L{Footprint5Tuple}.
@see: References in module L{ltp}. '''
_down_, _east_, _ecef_, _elevation_, _height_, \ _lat_, _lon_, _ltp_, _M_, _name_, _north_, \ _up_, _x_, _xyz_, _y_, _z_ _Pass, _xnamed Property_RO, property_RO Meter, Meter_
'''(INTERNAL) Elevation and slant range to ground range. '''
'''(INTERNAL) Get attribute name and value strings, joined and bracketed. '''
'''(INTERNAL) Convert 4-Tuple to C{Cls} instance. ''' elif issubclassof(Cls, Enu): # PYCHOK no cover return inst.xyzLocal.toEnu(Enu=Cls, **Cls_kwds) elif issubclassof(Cls, XyzLocal): # PYCHOK no cover return inst.xyzLocal.toXyz(Xyz=Cls, **Cls_kwds) elif Cls is Local9Tuple: # PYCHOK no cover return inst.xyzLocal.toLocal9Tuple(**Cls_kwds) n = inst.__class__.__name__[:3] # PYCHOK no cover raise _TypesError(n, Cls, Aer, Enu, Ned, XyzLocal)
'''(INTERNAL) Convert C{(x, y, z}) to C{(A, E, R)}. '''
'''(INTERNAL) Base class for classes C{Aer} and C{Ned}. '''
'''Get the I{local tangent plane} (L{Ltp}). '''
'''Get the I{local} I{Azimuth, Elevation, slant Range} (AER) components.
@kwarg Aer: Class to return AER (L{Aer}) or C{None}. @kwarg Aer_kwds: Optional, additional B{L{Aer}} keyword arguments, ignored if B{C{Aer}} is C{None}.
@return: AER as an L{Aer} instance or if C{B{Aer} is None}, an L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}. ''' return self.xyz4._toXyz(Aer, Aer_kwds)
'''Get the I{local} I{East, North, Up} (ENU) components.
@kwarg Enu: Class to return ENU (L{Enu}) or C{None}. @kwarg Enu_kwds: Optional, additional B{L{Enu}} keyword arguments, ignored if C{B{Enu} is None}.
@return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an L{Enu4Tuple}C{(east, north, up, ltp)}. ''' return self.xyz4._toXyz(Enu, Enu_kwds)
'''Get the I{local} I{North, East, Down} (NED) components.
@kwarg Ned: Class to return NED (L{Ned}) or C{None}. @kwarg Ned_kwds: Optional, additional B{L{Ned}} keyword arguments, ignored if B{C{Ned}} is C{None}.
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an L{Ned4Tuple}C{(north, east, down, ltp)}. ''' return self.xyz4._toXyz(Ned, Ned_kwds)
'''Get the local I{X, Y, Z} (XYZ) components.
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer}) or C{None}. @kwarg Xyz_kwds: Optional, additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz} is None}.
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an L{Xyz4Tuple}C{(x, y, z, ltp)}.
@raise TypeError: Invalid B{C{Xyz}}. '''
'''Get the I{local} C{(X, Y, Z)} coordinates (L{Vector3Tuple}C{(x, y, z)}). '''
'''(INTERNAL) I{Must be overloaded}, see function C{notOverloaded}. ''' notOverloaded(self)
'''Get this AER or NED as an L{XyzLocal}. '''
'''Local C{Azimuth-Elevation-Range} (AER) in a I{local tangent plane}. ''' # _ltp = None # local tangent plane (C{Ltp}), origin
'''New L{Aer}.
@arg aer: Scalar azimuth, bearing from North (C{degrees360}) or local (L{Aer}, L{Aer4Tuple}). @kwarg elevation: Scalar angle I{above} horizon, I{above} B{C{ltp}} (C{degrees90}) if scalar B{C{aer}}. @kwarg slantrange: Scalar distance (C{meter}) if scalar B{C{aer}}. @kwarg ltp: The I{local tangent plane}, (geodetic) origin (L{Ltp}, L{LocalCartesian}). @kwarg name: Optional name (C{str}).
@raise TypeError: Invalid B{C{ltp}}.
@raise UnitError: Invalid B{C{azimuth}}, B{C{elevation}} or or B{C{slantrange}}. ''' try: # PYCHOK no cover self._azimuth, self._elevation, self._slantrange = \ aer.azimuth, aer.elevation, aer.slantrange _xinstanceof(Aer, Aer4Tuple, aer=aer) p = getattr(aer, _ltp_, ltp) n = getattr(aer, _name_, name) except AttributeError: self._azimuth = Bearing(azimuth=aer) self._elevation = Degrees_(elevation=elevation, low=_N_90_0, high=_90_0) self._slantrange = Meter_(slantrange=slantrange) p, n = ltp, name
'''Get the C{(azimuth, elevation, slantrange, ltp)} components (L{Aer4Tuple}). '''
'''Get the Azimuth, bearing from North (C{degrees360}). '''
'''Get the Down component (C{meter}). '''
'''Get the East component (C{meter}). '''
'''Get the Elevation, tilt above horizon (C{degrees90}). '''
'''Get the I{ground range}, distance (C{meter}). '''
'''Get the North component (C{meter}). '''
'''Get the I{slant Range}, distance (C{meter}). '''
'''Return a string representation of this AER as azimuth (bearing), elevation and slant range.
@kwarg prec: Number of (decimal) digits, unstripped (C{int}). @kwarg fmt: Enclosing backets format (C{str}). @kwarg sep: Optional separator between AERs (C{str}).
@return: This AER as "[A:degrees360, E:degrees90, R:meter]" (C{str}). ''' toDMS(self.elevation, form=F_D, prec=prec, ddd=0), fstr( self.slantrange, prec=3 if prec is None else prec))
'''Return a string representation of this AER.
@kwarg prec_fmt_sep: Keyword arguments C{B{prec}=3} for the number of (decimal) digits, unstripped (C{int}), C{B{fmt}='[]'} the enclosing backets format (C{str}) and separator C{B{sep}=', '} to join (C{str}).
@return: This AER as "[degrees360, degrees90, meter]" (C{str}). '''
'''Get the Up component (C{meter}). '''
'''Get the X component (C{meter}). '''
'''Get the C{(x, y, z, ltp)} components (L{Xyz4Tuple}). '''
'''Get the Y component (C{meter}). '''
'''Get the Z component (C{meter}). '''
'''4-Tuple C{(azimuth, elevation, slantrange, ltp)}, all in C{meter} except C{ltp}. '''
'''(INTERNAL) Return C{Cls(..., **Cls_kwds)} instance. ''' else: return _4Tuple2Cls(self, Cls, Cls_kwds)
'''Get the I{ground range}, distance (C{meter}). '''
'''Get this L{Aer4Tuple} as an L{XyzLocal}. ''' return Aer(self).xyzLocal
'''4-Tuple C{(alt, tilt, yaw, roll)} with C{altitude} in (positive) C{meter} and C{tilt}, C{yaw} and C{roll} in C{degrees} representing the attitude of a plane or camera. '''
'''Return this attitude (L{Attitude4Tuple}). '''
'''Get this attitude's (3-D) directional vector (L{Vector3d}). '''
'''Local C{North-Eeast-Down} (NED) location in a I{local tangent plane}.
@see: L{Enu} and L{Ltp}. ''' # _ltp = None # local tangent plane (C{Ltp}), origin
'''New L{Ned} vector.
@arg ned: Scalar north component (C{meter}) or local NED (L{Ned}, L{Ned4Tuple}). @kwarg east: Scalar east component (C{meter}) if scalar B{C{ned}}. @kwarg down: Scalar down component, normal to I{inside} surface of the ellipsoid or sphere (C{meter}) if scalar B{C{ned}}. @kwarg ltp: The I{local tangent plane}, (geodetic) origin (L{Ltp}, L{LocalCartesian}). @kwarg name: Optional name (C{str}).
@raise TypeError: Invalid B{C{ltp}}.
@raise UnitError: Invalid B{C{north}}, B{C{east}} or B{C{down}}. ''' try: # PYCHOK no cover self._north, self._east, self._down = ned.north, ned.east, ned.down _xinstanceof(Ned, Ned4Tuple, ned=ned) p = getattr(ned, _ltp_, ltp) n = getattr(ned, _name_, name) except AttributeError: self._north = Meter(north=ned or _0_0) self._east = Meter(east=east or _0_0) self._down = Meter(down=down or _0_0) p, n = ltp, name
'''Get the C{(azimuth, elevation, slantrange, ltp)} components (L{Aer4Tuple}). '''
'''Get the Azimuth, bearing from North (C{degrees360}). '''
'''DEPRECATED, use C{azimuth}.'''
'''Get the Down component (C{meter}). '''
'''Get the East component (C{meter}). '''
'''Get the Elevation, tilt above horizon (C{degrees90}). '''
'''Get the I{ground range}, distance (C{meter}). '''
'''DEPRECATED, use C{slantrange}.'''
'''DEPRECATED, use property C{ned4}.'''
'''Get the C{(north, east, down, ltp)} components (L{Ned4Tuple}). '''
'''Get the North component (C{meter}). '''
'''Get the I{slant Range}, distance (C{meter}). '''
def to3ned(self): # PYCHOK no cover '''DEPRECATED, use property L{ned4}.''' return self.ned # XXX deprecated too
'''Return a string representation of this NED.
@kwarg prec: Number of (decimal) digits, unstripped (C{int}). @kwarg fmt: Enclosing backets format (C{str}). @kwarg sep: Separator to join (C{str}).
@return: This NED as "[N:meter, E:meter, D:meter]" (C{str}). '''
'''Return a string representation of this NED.
@kwarg prec_fmt_sep: Keyword arguments C{B{prec}=3} for the number of (decimal) digits, unstripped (C{int}), C{B{fmt}='[]'} the enclosing backets format (C{str}) and separator C{B{sep}=', '} to join (C{str}).
@return: This NED as "[meter, meter, meter]" (C{str}). '''
'''DEPRECATED, use property L{xyz}.'''
'''Get the Up component (C{meter}). '''
'''Get the X component (C{meter}). '''
'''Get the C{(x, y, z, ltp)} components (L{Xyz4Tuple}). '''
'''Get the Y component (C{meter}). '''
'''Get the Z component (C{meter}). '''
'''4-Tuple C{(north, east, down, ltp)}, all in C{meter} except C{ltp}. '''
'''(INTERNAL) Return C{Cls(..., **Cls_kwds)} instance. ''' else: return _4Tuple2Cls(self, Cls, Cls_kwds)
'''Get this L{Ned4Tuple} as an L{XyzLocal}. ''' return Ned(self).xyzLocal
'''Local C{(x, y, z)} in a I{local tangent plane} (LTP) and base class for local L{Enu}, L{Ned} and L{Aer}. '''
'''New L{XyzLocal}.
@arg x_xyz: Scalar X component (C{meter}), C{positive east} or a local (L{XyzLocal}, L{Xyz4Tuple}, L{Enu}, L{Enu4Tuple}, L{Local9Tuple}). @kwarg y: Scalar Y component (C{meter}) for scalar B{C{x_xyz}}, C{positive north}. @kwarg z: Scalar Z component for scalar B{C{x_xyz}}, normal C{positive up} from the surface of the ellipsoid or sphere (C{meter}). @kwarg ltp: The I{local tangent plane}, (geodetic) origin (L{Ltp}, L{LocalCartesian}).
@raise TypeError: Invalid B{C{x_xyz}} or B{C{ltp}}.
@raise UnitError: Invalid scalar B{C{x_xyz}}, B{C{y}} or B{C{z}}. ''' **{self._toStr: x_xyz}) except AttributeError: self._x = Meter(x=x_xyz or _0_0) self._y = Meter(y=y or _0_0) self._z = Meter(z=z or _0_0) p, n = ltp, name
return self.toStr()
'''Get the C{(azimuth, elevation, slantrange, ltp)} components (L{Aer4Tuple}). '''
'''Get the Azimuth, bearing from North (C{degrees360}).
@see: U{Azimuth<https://GSSC.ESA.int/navipedia/index.php/ Transformations_between_ECEF_and_ENU_coordinates>}. '''
def classof(self, *args, **kwds): # PYCHOK no cover '''Create another instance of this very class.
@arg args: Optional, positional arguments. @kwarg kwds: Optional, keyword arguments.
@return: New instance (C{self.__class__}). ''' kwds = _xkwds(kwds, ltp=self.ltp, name=self.name) return self.__class__(*args, **kwds)
'''Get the Down component (C{meter}). '''
'''Get this LTP's ECEF converter (C{Ecef...} I{instance}). ''' return self.ltp.ecef
'''Get the East component (C{meter}). '''
'''Get the Elevation, tilt above horizon (C{degrees90}).
@see: U{Elevation<https://GSSC.ESA.int/navipedia/index.php/ Transformations_between_ECEF_and_ENU_coordinates>}. '''
'''Get the C{(east, north, up, ltp)} components (L{Enu4Tuple}). '''
'''Get the I{ground range}, distance (C{meter}). '''
'''Get the I{local tangent plane} (L{Ltp}). '''
'''Get the C{(north, east, down, ltp)} components (L{Ned4Tuple}). '''
'''Get the North component (C{meter}). '''
'''Get the I{slant Range}, distance (C{meter}). '''
'''Get the local I{Azimuth, Elevation, slantRange} components.
@kwarg Aer: Class to return AER (L{Aer}) or C{None}. @kwarg Aer_kwds: Optional, additional B{C{Aer}} keyword arguments, ignored if C{B{Aer} is None}.
@return: AER as an L{Aer} instance or if C{B{Aer} is None}, an L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
@raise TypeError: Invalid B{C{Aer}}. '''
'''Get the geocentric C{(x, y, z)} (ECEF) coordinates of this local.
@kwarg Cartesian: Optional class to return C{(x, y, z)} (C{Cartesian}) or C{None}. @kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding this C{ltp}. @kwarg Cartesian_kwds: Optional, additional B{C{Cartesian}} keyword arguments, ignored if C{B{Cartesian} is None}.
@return: A B{C{Cartesian}} instance of if C{B{Cartesian} is None}, an L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with C{M=None}, always.
@raise TypeError: Invalid B{C{ltp}}, B{C{Cartesian}} or B{C{Cartesian_kwds}} argument. ''' r = ltp._local2ecef(self, nine=True) else:
'''Get the local I{East, North, Up} (ENU) components.
@kwarg Enu: Class to return ENU (L{Enu}) or C{None}. @kwarg Enu_kwds: Optional, additional B{C{Enu}} keyword arguments, ignored if C{B{Enu} is None}.
@return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an L{Enu4Tuple}C{(east, north, up, ltp)}. '''
'''Get the geodetic C{(lat, lon, height)} coordinates if this local.
@kwarg LatLon: Optional class to return C{(x, y, z)} (C{LatLon}) or C{None}. @kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding this ENU/NED/AER/XYZ's LTP. @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon} is None}.
@return: An B{C{LatLon}} instance of if C{B{LatLon} is None}, an L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with C{M=None}, always.
@raise TypeError: Invalid B{C{ltp}}, B{C{LatLon}} or B{C{LatLon_kwds}} argument. ''' r = _xnamed(r, self.name or ltp.name) else: name=self.name or ltp.name)
'''Get this local as a C{Local9Tuple}.
@kwarg M: Optionally include the rotation matrix (C{bool}). @kwarg name: Optional name (C{str}).
@return: L{Local9Tuple}C{(x, y, z, lat, lon, height, ltp, ecef, M)} with C{ltp} this C{Ltp}, C{ecef} an L{Ecef9Tuple} and C{M} L{EcefMatrix} or C{None}. ''' ltp, t, t.M, name=name or t.name)
'''Get the local I{North, East, Down} (Ned) components.
@kwarg Ned: Class to return NED (L{Ned}) or C{None}. @kwarg Ned_kwds: Optional, additional B{C{Ned}} keyword arguments, ignored if C{B{Ned} is None}.
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an L{Ned4Tuple}C{(north, east, down, ltp)}. '''
'''Return a string representation of this ENU/NED/XYZ.
@kwarg prec: Number of (decimal) digits, unstripped (C{int}). @kwarg fmt: Enclosing backets format (C{str}). @kwarg sep: Separator to join (C{str}).
@return: This XYZ/ENU as "[E:meter, N:meter, U:meter]", "[N:meter, E:meter, D:meter]" respectively "[X:meter, Y:meter, Z:meter]" (C{str}). '''
'''Return a string representation of this XYZ.
@kwarg prec_fmt_sep: Keyword arguments C{B{prec}=3} for the number of (decimal) digits, unstripped (C{int}), C{B{fmt}='[]'} the enclosing backets format (C{str}) and separator C{B{sep}=', '} to join (C{str}).
@return: This XYZ as "[meter, meter, meter]" (C{str}). '''
'''Get the local I{X, Y, Z} (XYZ) components.
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer}) or C{None}. @kwarg Xyz_kwds: Optional, additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz} is None}.
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an L{Xyz4Tuple}C{(x, y, z, ltp)}. '''
'''Get the Up component (C{meter}). '''
# @Property_RO # def x(self): # see: Vector3d.x # '''Get the X component (C{meter}). # ''' # return self._x
# @Property_RO # def xyz(self): # see: Vector3d.xyz # '''Get the I{local} C{(X, Y, Z)} coordinates (L{Vector3Tuple}C{(x, y, z)}). # ''' # return Vector3Tuple(self.x, self.y, self.z, name=self.name) # like Ecef9Tuple.xyz, Local6tuple.xyz
'''Get the C{(x, y, z, ltp)} components (L{Xyz4Tuple}). '''
'''Get this L{XyzLocal}. '''
# @Property_RO # def y(self): # see: Vector3d.y # '''Get the Y component (C{meter}). # ''' # return self._y
# @Property_RO # def z(self): # see: Vector3d.z # '''Get the Z component (C{meter}). # ''' # return self._z
'''4-Tuple C{(x, y, z, ltp)}, all in C{meter} except C{ltp}. '''
'''(INTERNAL) Return C{Cls(..., **Cls_kwds)} instance. ''' else:
'''Get this L{Xyz4Tuple} as an L{XyzLocal}. '''
'''Local C{Eeast-North-Up} (ENU) location in a I{local tangent plane}.
@see: U{East, North, Up (ENU)<https://GSSC.ESA.int/navipedia/index.php/ Transformations_between_ECEF_and_ENU_coordinates>} coordinates. '''
'''New L{Enu}.
@arg enu: Scalar East component (C{meter}) or a local (L{Enu}, (L{XyzLocal}, L{Local9Tuple}). @kwarg north: Scalar North component (C{meter}) if scalar B{C{enu}}. @kwarg up: Scalar Up component if scalar B{C{enu}}, normal from the surface of the ellipsoid or sphere (C{meter}). @kwarg ltp: The I{local tangent plane}, (geodetic) origin (L{Ltp}, L{LocalCartesian}). @kwarg name: Optional name (C{str}).
@raise TypeError: Invalid B{C{enu}} or B{C{ltp}}.
@raise UnitError: Invalid B{C{east}}, B{C{north}} or B{C{up}}. '''
# @Property_RO # def xyzLocal(self): # return XyzLocal(self, name=self.name)
'''4-Tuple C{(east, north, up, ltp)}, in C{meter} except C{ltp}. '''
'''(INTERNAL) Return C{Cls(..., **Cls_kwds)} instance. ''' else: return _4Tuple2Cls(self, Cls, Cls_kwds)
'''Get this L{Enu4Tuple} as an L{XyzLocal}. ''' return XyzLocal(*self, name=self.name)
'''9-Tuple C{(x, y, z, lat, lon, height, ltp, ecef, M)} with I{local} C{x}, C{y}, C{z} all in C{meter}, I{geodetic} C{lat}, C{lon}, C{height}, I{local tangent plane} C{ltp} (L{Ltp}), C{ecef} (L{Ecef9Tuple}) with I{geocentric} C{x}, C{y}, C{z}, I{geodetic} C{lat}, C{lon}, C{height} and I{concatenated} rotation matrix C{M} (L{EcefMatrix}) or C{None}. '''
'''Get the I{local} Azimuth, bearing from North (C{degrees360}). '''
'''Get the I{local} Down, C{-z} component (C{meter}). '''
'''Get the I{local} East, C{x} component (C{meter}). '''
'''Get the I{local} Elevation, tilt I{above} horizon (C{degrees90}). '''
'''Get the I{local} ground range, distance (C{meter}). '''
'''Get the I{geodetic} longitude in C{radians} (C{float}). '''
'''Get the I{geodetic} lat-, longitude in C{degrees} (L{LatLon2Tuple}C{(lat, lon)}). '''
'''Get the I{geodetic} lat-, longitude in C{degrees} and height (L{LatLon3Tuple}C{(lat, lon, height)}). '''
'''Get the I{local} North, C{y} component (C{meter}). '''
'''Get the I{geodetic} latitude in C{radians} (C{float}). '''
'''Get the I{geodetic} lat-, longitude in C{radians} (L{PhiLam2Tuple}C{(phi, lam)}). '''
'''Get the I{geodetic} lat-, longitude in C{radians} and height (L{PhiLam3Tuple}C{(phi, lam, height)}). '''
'''Get the I{local} slant Range, distance (C{meter}). '''
'''Get the I{local} I{Azimuth, Elevation, slant Range} (AER) components.
@kwarg Aer: Class to return AER (L{Aer}) or C{None}. @kwarg Aer_kwds: Optional, additional B{L{Aer}} keyword arguments, ignored if B{C{Aer}} is C{None}.
@return: AER as an L{Aer} instance or if C{B{Aer} is None}, an L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}. ''' return self.xyzLocal.toAer(Aer=Aer, **Aer_kwds)
'''Convert this I{local} to I{geocentric} C{(x, y, z)} (ECEF).
@kwarg Cartesian: Optional class to return C{(x, y, z)} (C{Cartesian}) or C{None}. @kwarg Cartesian_kwds: Optional, additional B{C{Cartesian}} keyword arguments, ignored if C{B{Cartesian} is None}.
@return: A C{B{Cartesian}(x, y, z, **B{Cartesian_kwds})} instance or a L{Vector4Tuple}C{(x, y, z, h)} if C{B{Cartesian} is None}.
@raise TypeError: Invalid B{C{Cartesian}} or B{C{Cartesian_kwds}} argument. ''' return self.ecef.toCartesian(Cartesian=Cartesian, **Cartesian_kwds) # PYCHOK _Tuple
'''Get the I{local} I{East, North, Up} (ENU) components.
@kwarg Enu: Class to return ENU (L{Enu}) or C{None}. @kwarg Enu_kwds: Optional, additional B{L{Enu}} keyword arguments, ignored if C{B{Enu} is None}.
@return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an L{Enu4Tuple}C{(east, north, up, ltp)}. ''' return self.xyzLocal.toEnu(Enu=Enu, **Enu_kwds)
'''Convert this I{local} to I{geodetic} C{(lat, lon, height)}.
@kwarg LatLon: Optional class to return C{(lat, lon, height)} (C{LatLon}) or C{None}. @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon} is None}.
@return: An instance of C{B{LatLon}(lat, lon, **B{LatLon_kwds})} or if C{B{LatLon} is None}, a L{LatLon3Tuple}C{(lat, lon, height)} respectively L{LatLon4Tuple}C{(lat, lon, height, datum)} depending on whether C{datum} is un-/specified.
@raise TypeError: Invalid B{C{LatLon}} or B{C{LatLon_kwds}} argument. '''
'''Get the I{local} I{North, East, Down} (NED) components.
@kwarg Ned: Class to return NED (L{Ned}) or C{None}. @kwarg Ned_kwds: Optional, additional B{L{Ned}} keyword arguments, ignored if B{C{Ned}} is C{None}.
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an L{Ned4Tuple}C{(north, east, down, ltp)}. ''' return self.xyzLocal.toNed(Ned=Ned, **Ned_kwds)
'''Get the I{local} I{X, Y, Z} (XYZ) components.
@kwarg Xyz: Class to return XYZ (L{XyzLocal}) or C{None}. @kwarg Xyz_kwds: Optional, additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz} is None}.
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an L{Xyz4Tuple}C{(x, y, z, ltp)}. '''
'''Get the I{local} Up, C{z} component (C{meter}). '''
'''Get the I{local} C{(X, Y, Z)} components (L{Vector3Tuple}C{(x, y, z)}). '''
'''Get this L{Local9Tuple} as an L{XyzLocal}. '''
'''5-Tuple C{(center, upperleft, upperight, loweright, lowerleft)} with the C{center} and 4 corners of the I{local} projection of a C{Frustum}, each an L{Xyz4Tuple}, L{XyzLocal}, C{LatLon}, etc.
@note: Misspelling of C{upperight} and C{loweright} is I{intentional}. '''
'''Convert this footprint's C{center} and 4 corners to I{geodetic} C{LatLon(lat, lon, height)}s or C{LatLon3-} or C{-4Tuple}s.
@kwarg ltp: The I{local tangent plane} (L{Ltp}), overriding this footprint's C{center} or C{frustrum} C{ltp}. @kwarg LatLon: Optional I{geodetic} class (C{LatLon}) or C{None}. @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon} is None}.
@return: A L{Footprint5Tuple} of 5 C{B{LatLon}(lat, lon, **B{LatLon_kwds})} instances or if C{B{LatLon} is None}, 5 L{LatLon3Tuple}C{(lat, lon, height)}s respectively 5 L{LatLon4Tuple}C{(lat, lon, height, datum)}s depending on keyword argument C{datum} is un-/specified.
@raise TypeError: Invalid B{C{ltp}}, B{C{LatLon}} or B{C{LatLon_kwds}}.
@see: Methods L{XyzLocal.toLatLon} and L{Footprint5Tuple.xyzLocal5}. ''' LatLon=LatLon, name=self.name,)
'''Return this footprint's C{center} and 4 corners as 5 L{XyzLocal}s.
@kwarg ltp: The I{local tangent plane} (L{Ltp}), overriding the {center} and corner C{ltp}s.
@return: A L{Footprint5Tuple} of 5 L{XyzLocal} instances.
@raise TypeError: Invalid B{C{ltp}}. ''' else: p = _MODS.ltp._xLtp(ltp) p = tuple(Xyz4Tuple(t.x, t.y, t.z, p) for t in self)
# **) MIT License # # Copyright (C) 2016-2022 -- mrJean1 at Gmail -- All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. |