Package pygeodesy :: Module datum :: Class Ellipsoid
[frames] | no frames]

Class Ellipsoid

 object --+        
          |        
 bases.Base --+    
              |    
 object --+   |    
          |   |    
bases.Named --+    
              |    
         _Based --+
                  |
                 Ellipsoid

Ellipsoid with semi-major, semi-minor axis, inverse flattening and a number of other pre-computed, frequently used values.

Instance Methods
 
__init__(self, a, b, f_, name='')
New ellipsoid.
 
__eq__(self, other)
Compare this and an other ellipsoid.
 
e2s2(self, s)
Compute the norm sqrt(1 - e2 * s**2).
 
radiusAt(self, lat)
Approximate the ellipsoid radius at the given latitude in degrees by trivial interpolation.
 
toStr(self, prec=8)
Return this ellipsoid as a string.

Inherited from _Based: __ne__

Inherited from bases.Base: __repr__, __str__, classname, classof, others, toStr2

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

Class Variables
  a = 0
Semi-major, equatorial axis (meter).
  b = 0
Semi-minor, polar axis (meter): a * (f - 1) / f.
  a2 = 0
(1 / a**2) (float).
  ab = 1
(a / b) = 1 / (1 - f) (float).
  e = 0
1st Eccentricity: sqrt(1 - (b / a)**2)) (float).
  e2 = 0
1st Eccentricity squared: f * (2 - f) = (a**2 - b**2) / a**2 (float).
  e4 = 0
e2**2 (float).
  e12 = 1
(1 - e2) (float).
  e22 = 0
2nd Eccentricity squared: e2 / (1 - e2) = ab**2 - 1 (float).
  f = 0
Flattening: (a - b) / a (float).
  f_ = 0
Inverse flattening: a / (a - b) = 1 /f (float).
  n = 0
3rd Flattening: f / (2 - f) = (a - b) / (a + b) (float).
  R = 0
Mean radius: (2 * a + b) / 3 per IUGG definition (meter).
  Rm = 0
Mean radius: sqrt(a * b) (meter).
  R2 = 0
Authalic radius: sqrt((a**2 + b**2 * atanh(e) / e) / 2) (meter).
  R3 = 0
Volumetric radius: cbrt(a * a * b) (meter).
  Rr = 0
Rectifying radius: ((a**3/2 + b**3/2) / 2)**2/3 (meter).
Properties
  A
Get the meridional radius (meter).
  Alpha6
Get the 6th-order Krüger Alpha series (7-tuple, 1-origin).
  Beta6
Get the 6th-order Krüger Beta series (7-tuple, 1-origin).
  isEllipsoidal
Check whether this model is ellipsoidal (bool).
  isSpherical
Check whether this model is spherical (bool).
  Mabcd
Get the OSGR meridional coefficients, Airy130 only (4-tuple).

Inherited from bases.Named: name

Inherited from object: __class__

Method Details

__init__(self, a, b, f_, name='')
(Constructor)

 

New ellipsoid.

Parameters:
  • a - Semi-major, equatorial axis (meter).
  • b - Semi-minor, polar axis (meter).
  • f_ - Inverse flattening: a / (a - b) (float >>> 1).
  • name - Optional, unique name (string).
Raises:
  • NameError - If ellipsoid name already exists.
Overrides: object.__init__

__eq__(self, other)
(Equality operator)

 

Compare this and an other ellipsoid.

Parameters:
Returns:
True if equal (bool).

e2s2(self, s)

 

Compute the norm sqrt(1 - e2 * s**2).

Parameters:
  • s - S value (scalar).
Returns:
Norm (float).

radiusAt(self, lat)

 

Approximate the ellipsoid radius at the given latitude in degrees by trivial interpolation.

Parameters:
  • lat - Latitude (degrees90).
Returns:
Radius at that latitude (meter).

toStr(self, prec=8)

 

Return this ellipsoid as a string.

Parameters:
  • prec - Number of decimals, unstripped (int).
Returns:
Ellipsoid attributes (string).
Overrides: bases.Base.toStr

Property Details

A

Get the meridional radius (meter).

Get Method:
A(self) - Get the meridional radius (meter).

Alpha6

Get the 6th-order Krüger Alpha series (7-tuple, 1-origin).

Get Method:
Alpha6(self) - Get the 6th-order Krüger Alpha series (7-tuple, 1-origin).

Beta6

Get the 6th-order Krüger Beta series (7-tuple, 1-origin).

Get Method:
Beta6(self) - Get the 6th-order Krüger Beta series (7-tuple, 1-origin).

isEllipsoidal

Check whether this model is ellipsoidal (bool).

Get Method:
isEllipsoidal(self) - Check whether this model is ellipsoidal (bool).

isSpherical

Check whether this model is spherical (bool).

Get Method:
isSpherical(self) - Check whether this model is spherical (bool).

Mabcd

Get the OSGR meridional coefficients, Airy130 only (4-tuple).

Get Method:
Mabcd(self) - Get the OSGR meridional coefficients, Airy130 only (4-tuple).