Package pygeodesy :: Module geoids :: Class _GeoidBase |
[frames] | no frames]

# Class _GeoidBase

         object --+
                  |
       named._Named --+
                      |
    heights._HeightBase --+
                          |
                         _GeoidBase

Known Subclasses:
  - GeoidG2012B
  - , GeoidKarney
  - , GeoidPGM

(INTERNAL) Base class for `Geoid...`s.

Instance Methods
__init__(self, hs, p) (INTERNAL) Set up the grid axes, the `SciPy` interpolator and several internal geoid attributes. |
__call__(self, *llis) Interpolate the geoid height for one or several locations. |
__repr__(self) Default `repr(self)`. |
__str__(self) Default `str(self)`. |
center(self, LatLon=None) Return the center location and height of this geoid. |
height(self, lats, lons) Interpolate the geoid height for one or several lat-/longitudes. |
highest(self, LatLon=None, **unused) Return the location and largest height of this geoid. |
lowerleft(self, LatLon=None) Return the lower-left location and height of this geoid. |
lowerright(self, LatLon=None) Return the lower-right location and height of this geoid. |
lowest(self, LatLon=None, **unused) Return the location and the lowest height of this geoid. |
outside(self, lat, lon) Check whether a location is outside this geoid's lat-/longitude or crop range. |
toStr(self, prec=3, sep=`'``,` `'`) This geoid and all geoid attributes as a string. |
upperleft(self, LatLon=None) Return the upper-left location and height of this geoid. |
upperright(self, LatLon=None) Return the upper-right location and height of this geoid. |
Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| cropped An immutable property (`Read Only`).
| dtype An immutable property (`Read Only`).
| endian An immutable property (`Read Only`).
| hits An immutable property (`Read Only`).
| kind An immutable property (`Read Only`).
| knots An immutable property (`Read Only`).
| mean An immutable property (`Read Only`).
| name An immutable property (`Read Only`).
| nBytes An immutable property (`Read Only`).
| numpy An immutable property (`Read Only`).
| scipy An immutable property (`Read Only`).
| sizeB An immutable property (`Read Only`).
| smooth An immutable property (`Read Only`).
| stdev An immutable property (`Read Only`).
Inherited from `heights._HeightBase`: `adjust`, `kmin`, `wrap` Inherited from `named._Named`: `classname`, `classnaming`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__(self, hs, p) (Constructor) |
(INTERNAL) Set up the grid axes, the `SciPy` interpolator and several internal geoid attributes. Parameters: `hs` - Grid knots with known height (`numpy 2darray`). `p` - The `slat, wlon, nlat, nlon, dlat, dlon` and other geoid parameters (`INTERNAL`). Raises: `GeoidError` - Invalid `kind`. `SciPyError` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` issue. `SciPyWarning` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` warning as exception. Overrides: object.__init__

### __call__(self, *llis) (Call operator) |
Interpolate the geoid height for one or several locations. Parameters: `llis` - The location or locations (`LatLon`, ... or `LatLon`s). Returns: A single interpolated geoid height (`float`) or a list or tuple of interpolated geoid heights (`float`s). Raises: `GeoidError` - Insufficient number of `llis` or an invalid `lli`. `RangeError` - An `lli` is outside this geoid's lat- or longitude range. `SciPyError` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` issue. `SciPyWarning` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` warning as exception. Overrides: heights._HeightBase.__call__

### __repr__(self) (Representation operator) |
Default `repr(self)`. Overrides: object.__repr__ (inherited documentation)

### __str__(self) (Informal representation operator) |
Default `str(self)`. Overrides: object.__str__ (inherited documentation)

### center(self, LatLon=None) |
Return the center location and height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the grid center location.

### height(self, lats, lons) |
Interpolate the geoid height for one or several lat-/longitudes. Parameters: `lats` - Latitude or latitudes (`degrees` or `degrees`s). `lons` - Longitude or longitudes (`degrees` or `degrees`s). Returns: A single interpolated geoid height (`float`) or a list of interpolated geoid heights (`float`s). Raises: `GeoidError` - Insufficient or non-matching number of `lats` and `lons`. `RangeError` - A `lat` or `lon` is outside this geoid's lat- or longitude range. `SciPyError` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` issue. `SciPyWarning` - A `scipy.interpolate.inter2d` or `-.RectBivariateSpline` warning as exception.

### highest(self, LatLon=None, **unused) |
Return the location and largest height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the highest grid location.

### lowerleft(self, LatLon=None) |
Return the lower-left location and height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the lower-left, SW grid corner.

### lowerright(self, LatLon=None) |
Return the lower-right location and height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the lower-right, SE grid corner.

### lowest(self, LatLon=None, **unused) |
Return the location and the lowest height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the lowest grid location.

### outside(self, lat, lon) |
Check whether a location is outside this geoid's lat-/longitude or crop range. Parameters: `lat` - The latitude (`degrees`). `lon` - The longitude (`degrees`). Returns: A 1- or 2-character `str` if outside or an empty `str` if inside.

### toStr(self, prec=3, sep=`'``,` `'`) |
This geoid and all geoid attributes as a string. Parameters: `prec` - Optional number of decimal digits (0..9 or `None` for default). Trailing zero decimals are stripped for `prec` values of 1 and above, but kept for negative `prec` values. `sep` - Optional separator (`str`). Returns: Geoid name and attributes (`str`). Overrides: named._Named.toStr

### upperleft(self, LatLon=None) |
Return the upper-left location and height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the upper-left, NW grid corner.

### upperright(self, LatLon=None) |
Return the upper-right location and height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. Returns: A LatLon3Tuple`(lat, lon, height)` if `LatLon` is `None` or a `LatLon` instance with the lat-, longitude and height of the upper-right, NE grid corner.

Property Details

### cropped An immutable property (`Read Only`). Get Method: cropped(self) - Is geoid cropped (`bool` or `None` if crop not supported). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### dtype An immutable property (`Read Only`). Get Method: dtype(self) - Get the grid `scipy` dtype (`numpy.dtype`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### endian An immutable property (`Read Only`). Get Method: endian(self) - Get the geoid endianess and dtype (`str`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### hits An immutable property (`Read Only`). Get Method: hits(self) - Get the number of cache hits (`int` or `None`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### kind An immutable property (`Read Only`). Get Method: kind(self) - Get the interpolator kind and order (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### knots An immutable property (`Read Only`). Get Method: knots(self) - Get the number of grid knots (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### mean An immutable property (`Read Only`). Get Method: mean(self) - Get the mean of this geoid's heights (`float`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### name An immutable property (`Read Only`). Get Method: name(self) - Get the name of this geoid (`str`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### nBytes An immutable property (`Read Only`). Get Method: nBytes(self) - Get the grid in-memory size in bytes (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### numpy An immutable property (`Read Only`). Get Method: numpy(self) - Get the imported `numpy` version (`str`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### scipy An immutable property (`Read Only`). Get Method: scipy(self) - Get the imported `scipy` version (`str`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### sizeB An immutable property (`Read Only`). Get Method: sizeB(self) - Get the geoid grid file size in bytes (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### smooth An immutable property (`Read Only`). Get Method: smooth(self) - Get the `RectBivariateSpline` smoothing (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### stdev An immutable property (`Read Only`). Get Method: stdev(self) - Get the standard deviation of this geoid's heights (`float`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.