Package pygeodesy :: Module nvectorBase :: Class NvectorBase
[frames] | no frames]

Class NvectorBase

       object --+                
                |                
     named._Named --+            
                    |            
     named._NamedBase --+        
                        |        
vector3dBase.Vector3dBase --+    
                            |    
            vector3d.Vector3d --+
                                |
                               NvectorBase
Known Subclasses:

Base class for ellipsoidal and spherical Nvectors.

Instance Methods
 
__init__(self, x_xyz, y=None, z=None, h=0, ll=None, datum=None, name='')
New n-vector normal to the earth's surface.
 
hStr(self, prec=-2, m='')
Return a string for the height h.
 
to2ab(self)
DEPRECATED, use property philam.
 
to2ll(self)
DEPRECATED, use property latlon.
 
to3abh(self, height=None)
DEPRECATED, use property philamheight or philam.to3Tuple(height).
 
to3llh(self, height=None)
DEPRECATED, use property latlonheight or latlon.to3Tuple(height).
 
to4xyzh(self, h=None)
DEPRECATED, use property xyzh or xyz.to4Tuple(h).
 
toCartesian(self, h=None, Cartesian=None, datum=None, **Cartesian_kwds)
Convert this n-vector to Nvector-based cartesian (ECEF) coordinates.
 
toLatLon(self, height=None, LatLon=None, datum=None, **LatLon_kwds)
Convert this n-vector to an Nvector-based geodetic point.
 
toStr(self, prec=5, fmt='(%s)', sep=', ')
Return a string representation of this n-vector.
 
toVector3d(self, norm=True)
Convert this n-vector to a 3-D vector, ignoring height.
 
unit(self, ll=None)
Normalize this n-vector to unit length.

Inherited from vector3d.Vector3d: bearing, circin6, circum3, circum4_, iscolinearWith, meeus2, nearestOn, nearestOn6, parse, radii11, soddy4, trilaterate2d2, trilaterate3d2

Inherited from vector3dBase.Vector3dBase: __abs__, __add__, __bool__, __ceil__, __cmp__, __div__, __divmod__, __eq__, __float__, __floor__, __floordiv__, __format__, __ge__, __gt__, __hash__, __iadd__, __idiv__, __ifloordiv__, __imatmul__, __imod__, __imul__, __int__, __ipow__, __isub__, __itruediv__, __le__, __long__, __lt__, __matmul__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __pos__, __pow__, __radd__, __rdiv__, __rdivmod__, __rfloordiv__, __rmatmul__, __rmod__, __rmul__, __round__, __rpow__, __rsub__, __rtruediv__, __sub__, __truediv__, __trunc__, angleTo, apply, cmp, cross, dividedBy, dot, equals, equirectangular, intermediateTo, isconjugateTo, isequalTo, minus, minus_, negate, others, plus, plus_, rotate, rotateAround, sum, times, times_, to3xyz

Inherited from named._NamedBase: __repr__, __str__, toRepr

Inherited from named._Named: attrs, classof, copy, dup, methodname, rename, toStr2

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties
  Ecef
Get the ECEF class (EcefKarney), once.
  H
Class property with retrievable name.
  datum
Get the pass-thru datum (Datum) or None.
  ellipsoidalNvector
Get the Nvector type iff ellipsoidal, overloaded in pygeodesy.ellipsoidalNvector.Nvector.
  h
Class property with retrievable name.
  isEllipsoidal
Check whether this n-vector is ellipsoidal (bool or None if unknown).
  isSpherical
Check whether this n-vector is spherical (bool or None if unknown).
  lam
Get the (geodetic) longitude in radians (float).
  lat
Get the (geodetic) latitude in degrees (float).
  latlon
Get the (geodetic) lat-, longitude in degrees (LatLon2Tuple(lat, lon)).
  latlonheight
Get the (geodetic) lat-, longitude in degrees and height (LatLon3Tuple(lat, lon, height)).
  latlonheightdatum
Get the lat-, longitude in degrees with height and datum (LatLon4Tuple(lat, lon, height, datum)).
  lon
Get the (geodetic) longitude in degrees (float).
  phi
Get the (geodetic) latitude in radians (float).
  philam
Get the (geodetic) lat-, longitude in radians (PhiLam2Tuple(phi, lam)).
  philamheight
Get the (geodetic) lat-, longitude in radians and height (PhiLam3Tuple(phi, lam, height)).
  philamheightdatum
Get the lat-, longitude in radians with height and datum (PhiLam4Tuple(phi, lam, height, datum)).
  sphericalNvector
Get the Nvector type iff spherical, overloaded in pygeodesy.sphericalNvector.Nvector.
  xyzh
Get this n-vector's components (Vector4Tuple(x, y, z, h))

Inherited from vector3dBase.Vector3dBase: crosserrors, euclid, homogeneous, length, length2, x, x2y2z2, xyz, y, z

Inherited from named._Named: classname, classnaming, iteration, name, named, named2, named3, named4, sizeof

Inherited from object: __class__

Method Details

__init__ (self, x_xyz, y=None, z=None, h=0, ll=None, datum=None, name='')
(Constructor)

 

New n-vector normal to the earth's surface.

Arguments:
  • x_xyz - X component of vector (scalar) or (3-D) vector (Nvector, Vector3d, Vector3Tuple or Vector4Tuple).
  • y - Y component of vector (scalar), ignored if x_xyz is not scalar, otherwise same units as x_xyz.
  • z - Z component of vector (scalar), ignored if x_xyz is not scalar, otherwise same units as x_xyz.
  • h - Optional height above surface (meter).
  • ll - Optional, original latlon (LatLon).
  • datum - Optional, pass-thru datum (Datum).
  • name - Optional name (str).
Raises:
Overrides: object.__init__

hStr (self, prec=-2, m='')

 

Return a string for the height h.

Arguments:
  • prec - Number of (decimal) digits, unstripped (int).
  • m - Optional unit of the height (str).

See Also: Function pygeodesy.hstr.

to2ab (self)

 

DEPRECATED, use property philam.

Returns:
A PhiLam2Tuple(phi, lam).
Decorators:
  • @deprecated_method

to2ll (self)

 

DEPRECATED, use property latlon.

Returns:
A LatLon2Tuple(lat, lon).
Decorators:
  • @deprecated_method

to3abh (self, height=None)

 

DEPRECATED, use property philamheight or philam.to3Tuple(height).

Arguments:
  • height - Optional height, overriding this n-vector's height (meter).
Returns:
A PhiLam3Tuple(phi, lam, height).
Decorators:
  • @deprecated_method
Raises:
  • ValueError - Invalid height.

to3llh (self, height=None)

 

DEPRECATED, use property latlonheight or latlon.to3Tuple(height).

Arguments:
  • height - Optional height, overriding this n-vector's height (meter).
Returns:
A LatLon3Tuple(lat, lon, height).
Decorators:
  • @deprecated_method
Raises:
  • ValueError - Invalid height.

to4xyzh (self, h=None)

 

DEPRECATED, use property xyzh or xyz.to4Tuple(h).

Decorators:
  • @deprecated_method

toCartesian (self, h=None, Cartesian=None, datum=None, **Cartesian_kwds)

 

Convert this n-vector to Nvector-based cartesian (ECEF) coordinates.

Arguments:
  • h - Optional height, overriding this n-vector's height (meter).
  • Cartesian - Optional class to return the (ECEF) coordinates (Cartesian).
  • datum - Optional datum (Datum), overriding this datum.
  • Cartesian_kwds - Optional, additional Cartesian keyword arguments, ignored if Cartesian is None.
Returns:
The cartesian (ECEF) coordinates (Cartesian) or if Cartesian is None, an Ecef9Tuple(x, y, z, lat, lon, height, C, M, datum) with C and M if available.
Raises:
  • TypeError - Invalid Cartesian or Cartesian_kwds argument.
  • ValueError - Invalid h.

toLatLon (self, height=None, LatLon=None, datum=None, **LatLon_kwds)

 

Convert this n-vector to an Nvector-based geodetic point.

Arguments:
  • height - Optional height, overriding this n-vector's height (meter).
  • LatLon - Optional class to return the geodetic point (LatLon) or None.
  • datum - Optional, spherical datum (Datum).
  • LatLon_kwds - Optional, additional LatLon keyword arguments, ignored if LatLon is None.
Returns:
The geodetic point (LatLon) or if LatLon is None, an Ecef9Tuple(x, y, z, lat, lon, height, C, M, datum) with C and M if available.
Raises:
  • TypeError - Invalid LatLon or LatLon_kwds argument.
  • ValueError - Invalid height.

toStr (self, prec=5, fmt='(%s)', sep=', ')

 

Return a string representation of this n-vector.

Height component is only included if non-zero.

Arguments:
  • prec - Number of (decimal) digits, unstripped (int).
  • fmt - Enclosing backets format (str).
  • sep - Optional separator between components (str).
Returns:
Comma-separated "(x, y, z [, h])" enclosed in fmt brackets (str).
Overrides: named._Named.toStr

toVector3d (self, norm=True)

 

Convert this n-vector to a 3-D vector, ignoring height.

Arguments:
  • norm - Normalize the 3-D vector (bool).
Returns:
The (normalized) vector (Vector3d).

unit (self, ll=None)

 

Normalize this n-vector to unit length.

Arguments:
  • ll - Optional, original latlon (LatLon).
Returns:
Normalized vector (Nvector).
Overrides: vector3dBase.Vector3dBase.unit

Property Details

Ecef

Get the ECEF class (EcefKarney), once.

Get method:
Ecef(self) - Get the ECEF class (EcefKarney), once.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

H

Class property with retrievable name.

Get method:
H(self) - Get the height prefix (str).
Set method:
H(self, H) - Set the height prefix (str).

datum

Get the pass-thru datum (Datum) or None.

Get method:
datum(self) - Get the pass-thru datum (Datum) or None.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

ellipsoidalNvector

Get the Nvector type iff ellipsoidal, overloaded in pygeodesy.ellipsoidalNvector.Nvector.

Get method:
ellipsoidalNvector(self) - Get the Nvector type iff ellipsoidal, overloaded in pygeodesy.ellipsoidalNvector.Nvector.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

h

Class property with retrievable name.

Get method:
h(self) - Get the height above surface (meter).
Set method:
h(self, h) - Set the height above surface (meter).

isEllipsoidal

Check whether this n-vector is ellipsoidal (bool or None if unknown).

Get method:
isEllipsoidal(self) - Check whether this n-vector is ellipsoidal (bool or None if unknown).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

isSpherical

Check whether this n-vector is spherical (bool or None if unknown).

Get method:
isSpherical(self) - Check whether this n-vector is spherical (bool or None if unknown).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

lam

Get the (geodetic) longitude in radians (float).

Get method:
lam(self) - Get the (geodetic) longitude in radians (float).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

lat

Get the (geodetic) latitude in degrees (float).

Get method:
lat(self) - Get the (geodetic) latitude in degrees (float).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

latlon

Get the (geodetic) lat-, longitude in degrees (LatLon2Tuple(lat, lon)).

Get method:
latlon(self) - Get the (geodetic) lat-, longitude in degrees (LatLon2Tuple(lat, lon)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

latlonheight

Get the (geodetic) lat-, longitude in degrees and height (LatLon3Tuple(lat, lon, height)).

Get method:
latlonheight(self) - Get the (geodetic) lat-, longitude in degrees and height (LatLon3Tuple(lat, lon, height)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

latlonheightdatum

Get the lat-, longitude in degrees with height and datum (LatLon4Tuple(lat, lon, height, datum)).

Get method:
latlonheightdatum(self) - Get the lat-, longitude in degrees with height and datum (LatLon4Tuple(lat, lon, height, datum)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

lon

Get the (geodetic) longitude in degrees (float).

Get method:
lon(self) - Get the (geodetic) longitude in degrees (float).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

phi

Get the (geodetic) latitude in radians (float).

Get method:
phi(self) - Get the (geodetic) latitude in radians (float).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

philam

Get the (geodetic) lat-, longitude in radians (PhiLam2Tuple(phi, lam)).

Get method:
philam(self) - Get the (geodetic) lat-, longitude in radians (PhiLam2Tuple(phi, lam)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

philamheight

Get the (geodetic) lat-, longitude in radians and height (PhiLam3Tuple(phi, lam, height)).

Get method:
philamheight(self) - Get the (geodetic) lat-, longitude in radians and height (PhiLam3Tuple(phi, lam, height)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

philamheightdatum

Get the lat-, longitude in radians with height and datum (PhiLam4Tuple(phi, lam, height, datum)).

Get method:
philamheightdatum(self) - Get the lat-, longitude in radians with height and datum (PhiLam4Tuple(phi, lam, height, datum)).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

sphericalNvector

Get the Nvector type iff spherical, overloaded in pygeodesy.sphericalNvector.Nvector.

Get method:
sphericalNvector(self) - Get the Nvector type iff spherical, overloaded in pygeodesy.sphericalNvector.Nvector.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

xyzh

Get this n-vector's components (Vector4Tuple(x, y, z, h))

Get method:
xyzh(self) - Get this n-vector's components (Vector4Tuple(x, y, z, h))
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.