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

# Class Ellipsoid

     object --+
              |
    bases.Named --+
                  |
        bases.Based --+
                      |
                 _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. |
copy(self) Copy this ellipsoid. |
distance2(self, lat0, lon0, lat1, lon1) Approximate the distance and bearing between two points based on the radii of curvature. |
e2s(self, s) Compute norm sqrt(1 - e2 * s**2). |
e2s2(self, s) Compute 1 - e2 * s**2. |
m2degrees(self, meter) Convert distance to angle along equator. |
Rgeocentric(self, lat) Compute the geocentric earth radius at the given latitude. |
Rlat(self, lat) Approximate the earth radius at the given latitude. |
roc2(self, lat) Compute the meridional and prime-vertical radii of curvature at the given latitude. |
rocBearing(self, lat, bearing) Compute the directional radius of curvature at the given latitude and compass direction. |
rocGauss(self, lat) Compute the Gaussian radius of curvature at the given latitude. |
rocMean(self, lat) Compute the mean radius of curvature at the given latitude. |
rocMeridional(self, lat) Compute the meridional radius of curvature at the given latitude. |
rocPrimeVertical(self, lat) Compute the prime-vertical radius of curvature at the given latitude. |
toStr(self, prec=9) Return this ellipsoid as a string. |
Inherited from `_Based`: `__ne__`, `unregister` Inherited from `bases.Based`: `__repr__`, `__str__`, `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)
| a_b = `1` (a / b) = 1 / (1 - f)
| e = `0` 1st Eccentricity: sqrt(1 - (b / a)**2))
| e2 = `0` 1st Eccentricity squared: f * (2 - f) = 1 - (b / a)**2
| e4 = `0` e2**2
| e12 = `1` 1 - e2
| e22 = `0` 2nd Eccentricity squared: e2 / (1 - e2) = ab**2 - 1
| f = `0` Flattening: (a - b) / a
| f_ = `0` Inverse flattening: a / (a - b) = 1 / f
| n = `0` 3rd Flattening: f / (2 - f) = (a - b) / (a + b)

Properties
| A Get the UTM meridional radius (meter).
| a2_b Get the polar meridional radius of curvature: a**2 / b (meter).
| b2_a Get the equatorial meridional radius of curvature: b**2 / a (meter).
| AlphaKs Get the Krüger Alpha series coefficients (KsOrder-tuple).
| BetaKs Get the Krüger Beta series coefficients (KsOrder-tuple).
| geodesic Get this ellipsoid's Karney Geodesic, provided the GeographicLib package is installed.
| isEllipsoidal Check whether this model is ellipsoidal (bool).
| isSpherical Check whether this model is spherical (bool).
| KsOrder Get the Krüger series order (4, 6 or 8).
| Mabcd Get the OSGR meridional coefficients, Airy130 only (4-tuple).
| R1 Get the mean earth radius per IUGG: (2 * a + b) / 3 (meter).
| R2 Get the authalic earth radius: sqrt((a**2 + b**2 * atanh(e) / e) / 2) (meter).
| R3 Get the volumetric earth radius: (a * a * b)**1/3 (meter).
| Rr Get the rectifying earth radius: ((a**3/2 + b**3/2) / 2)**2/3 (meter).
| Rs Get another mean earth radius: sqrt(a * b) (meter).
Inherited from `_Based`: `name` Inherited from `bases.Named`: `classname`, `classnaming` 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` - Ellipsoid with that name already exists. Overrides: object.__init__

### __eq__(self, other) (Equality operator) |
Compare this and an other ellipsoid. Parameters: `other` - The other ellipsoid (Ellipsoid). Returns: True if equal (bool).

### copy(self) |
Copy this ellipsoid. Returns: The copy, unregistered (Ellipsoid or subclass thereof). Overrides: bases.Named.copy

### distance2(self, lat0, lon0, lat1, lon1) |
Approximate the distance and bearing between two points based on the radii of curvature. Suitable only for short distances up to a few hundred Km or Miles and only between points not near-polar. Parameters: `lat0` - From latitude (degrees). `lon0` - From longitude (degrees). `lat1` - To latitude (degrees). `lon1` - To longitude (degrees). Returns: 2-Tuple (distance, bearing) in (meter, degrees360). See Also: Local, Flat Earth.

### e2s(self, s) |
Compute norm sqrt(1 - e2 * s**2). Parameters: `s` - S value (scalar). Returns: Norm (float). Raises: `ValueError` - Invalid s.

### e2s2(self, s) |
Compute 1 - e2 * s**2. Parameters: `s` - S value (scalar). Returns: Result (float). Raises: `ValueError` - Invalid s.

### m2degrees(self, meter) |
Convert distance to angle along equator. Parameters: `meter` - Distance (meter). Returns: Angle (degrees).

### Rgeocentric(self, lat) |
Compute the geocentric earth radius at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Geocentric earth radius (meter). See Also: Geocentric Radius

### Rlat(self, lat) |
Approximate the earth radius at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Approximate earth radius (meter).

### roc2(self, lat) |
Compute the meridional and prime-vertical radii of curvature at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: 2-Tuple (meridional, prime-vertical) with the radii of curvature (meter, meter). See Also: Local, Flat Earth and Radii of Curvature.

### rocBearing(self, lat, bearing) |
Compute the directional radius of curvature at the given latitude and compass direction. Parameters: `lat` - Latitude (degrees90). `bearing` - Direction (compass degrees). Returns: Directional radius of curvature (meter). See Also: Radii of Curvature

### rocGauss(self, lat) |
Compute the Gaussian radius of curvature at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Gaussian radius of curvature (meter). See Also: Radii of Curvature

### rocMean(self, lat) |
Compute the mean radius of curvature at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Mean radius of curvature (meter). See Also: Radii of Curvature

### rocMeridional(self, lat) |
Compute the meridional radius of curvature at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Meridional radius of curvature (meter). See Also: Local, Flat Earth and Radii of Curvature.

### rocPrimeVertical(self, lat) |
Compute the prime-vertical radius of curvature at the given latitude. Parameters: `lat` - Latitude (degrees90). Returns: Prime-vertical radis of curvature (meter). See Also: Local, Flat Earth and Radii of Curvature.

### toStr(self, prec=9) |
Return this ellipsoid as a string. Parameters: `prec` - Optional number of decimals, unstripped (int). Returns: Ellipsoid attributes (string). Overrides: bases.Based.toStr

Property Details

### A Get the UTM meridional radius (meter). Get Method: A(self) - Get the UTM meridional radius (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### a2_b Get the polar meridional radius of curvature: a**2 / b (meter). Get Method: a2_b(self) - Get the polar meridional radius of curvature: a**2 / b (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Radii of Curvature.

### b2_a Get the equatorial meridional radius of curvature: b**2 / a (meter). Get Method: b2_a(self) - Get the equatorial meridional radius of curvature: b**2 / a (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Radii of Curvature.

### AlphaKs Get the Krüger Alpha series coefficients (KsOrder-tuple). Get Method: AlphaKs(self) - Get the Krüger Alpha series coefficients (KsOrder-tuple). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### BetaKs Get the Krüger Beta series coefficients (KsOrder-tuple). Get Method: BetaKs(self) - Get the Krüger Beta series coefficients (KsOrder-tuple). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### geodesic Get this ellipsoid's Karney Geodesic, provided the GeographicLib package is installed. Get Method: geodesic(self) - Get this ellipsoid's Karney Geodesic, provided the GeographicLib package is installed. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### isEllipsoidal Check whether this model is ellipsoidal (bool). Get Method: isEllipsoidal(self) - Check whether this model is ellipsoidal (bool). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### isSpherical Check whether this model is spherical (bool). Get Method: isSpherical(self) - Check whether this model is spherical (bool). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### KsOrder Get the Krüger series order (4, 6 or 8). Get Method: KsOrder(self) - Get the Krüger series order (4, 6 or 8). Set Method: KsOrder(self, order) - Set the Krüger series order.

### Mabcd Get the OSGR meridional coefficients, Airy130 only (4-tuple). Get Method: Mabcd(self) - Get the OSGR meridional coefficients, Airy130 only (4-tuple). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### R1 Get the mean earth radius per IUGG: (2 * a + b) / 3 (meter). Get Method: R1(self) - Get the mean earth radius per IUGG: (2 * a + b) / 3 (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Earth radius.

### R2 Get the authalic earth radius: sqrt((a**2 + b**2 * atanh(e) / e) / 2) (meter). Get Method: R2(self) - Get the authalic earth radius: sqrt((a**2 + b**2 * atanh(e) / e) / 2) (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Earth radius.

### R3 Get the volumetric earth radius: (a * a * b)**1/3 (meter). Get Method: R3(self) - Get the volumetric earth radius: (a * a * b)**1/3 (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Earth radius.

### Rr Get the rectifying earth radius: ((a**3/2 + b**3/2) / 2)**2/3 (meter). Get Method: Rr(self) - Get the rectifying earth radius: ((a**3/2 + b**3/2) / 2)**2/3 (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always. See Also: Earth radius.

### Rs Get another mean earth radius: sqrt(a * b) (meter). Get Method: Rs(self) - Get another mean earth radius: sqrt(a * b) (meter). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.