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

# Class GeoidKarney

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

Geoid height interpolator for Charles Karney's GeographicLib Earth Gravitational Model (EGM) geoid egm*.pgm datasets using bilinear or cubic interpolation and caching in pure Python transcribed from Karney's C++ class Geoid.

Use any of the geoid egm84-, egm96- or egm2008-*.pgm datasets.

Instance Methods
__init__(self, egm_pgm, crop=None, datum=None, kind=3, name=`'````'`, smooth=None) New GeoidKarney interpolator. |
__call__(self, *llis) Interpolate the geoid height for one or several locations. |
height(self, lats, lons) Interpolate the geoid height for one or several lat-/longitudes. |
highest(self, LatLon=None, full=False) Return the location and largest height of this geoid. |
lowest(self, LatLon=None, full=False) Return the location and the lowest height of this geoid. |
Inherited from `_GeoidBase`: `__repr__`, `__str__`, `center`, `lowerleft`, `lowerright`, `outside`, `toStr`, `upperleft`, `upperright` Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

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

Method Details

### __init__(self, egm_pgm, crop=None, datum=None, kind=3, name=`'````'`, smooth=None) (Constructor) |
New GeoidKarney interpolator. Parameters: `egm_pgm` - An EGM geoid dataset file name (`egm*.pgm`). `crop` - Optional box to limit geoid locations, a 4-tuple (`south, west, north, east`), 2-tuple (`(south, west), (north, east)`) or 2, in `degrees90` lat- and `degrees180` longitudes or a 2-tuple (`LatLonSW, LatLonNE`) of `LatLon` instances. `datum` - Optional grid datum (`Datum`), default `WGS84`. `kind` - Interpolation order (`int`), 2 for `bilinear` or 3 for `cubic`. `name` - Optional geoid name (`str`). `smooth` - Smoothing factor, unsupported (`None`). Raises: `GeoidError` - EGM dataset `egm_pgm` issue or invalid `crop`, `kind` or `smooth`. Overrides: object.__init__ See Also: Class GeoidPGM and function egmGeoidHeights.

### __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. Overrides: heights._HeightBase.__call__

### 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. Overrides: _GeoidBase.height

### highest(self, LatLon=None, full=False) |
Return the location and largest height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. `full` - Search the full or limited latitude range (`bool`). 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. Overrides: _GeoidBase.highest

### lowest(self, LatLon=None, full=False) |
Return the location and the lowest height of this geoid. Parameters: `LatLon` - Optional (sub-)class to return the location (`LatLon`) and height or `None`. `full` - Search the full or limited latitude range (`bool`). 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. Overrides: _GeoidBase.lowest

Property Details

### dtype An immutable property (`Read Only`). Get Method: dtype(self) - Get the geoid's grid data type (`str`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### pgm An immutable property (`Read Only`). Get Method: pgm(self) - Get the PGM attributes (`_PGM`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### u2B An immutable property (`Read Only`). Get Method: u2B(self) - Get the PGM itemsize in bytes (`int`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.