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

# Class GeoidKarney

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

Geoid height interpolator for Karney's GeographicLib Earth Gravitational Model (EGM) geoid egm*.pgm datasets using bilinear or cubic interpolation and caching in pure Python, transcoded 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, **wrap) Interpolate the geoid height for one or several locations. |
height(self, lats, lons, **wrap) 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 lowest height of this geoid. |
Inherited from `_GeoidBase`: `__enter__`, `__exit__`, `__repr__`, `__str__`, `center`, `close`, `loweright`, `lowerleft`, `lowerright`, `outside`, `toStr`, `upperleft`, `upperright` Inherited from `named._Named`: `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `toRepr`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| dtype Get the geoid's grid data type (`str`).
Inherited from `_GeoidBase`: `closed`, `cropped`, `endian`, `hits`, `kind`, `knots`, `mean`, `nBytes`, `name`, `pgm`, `sizeB`, `smooth`, `stdev`, `u2B` Inherited from `heights._HeightsBase`: `numpy`, `scipy`, `scipy_interpolate` Inherited from `heights._HeightBase`: `datum`, `kmin`, `wrap` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, egm_pgm, crop=None, datum=None, kind=3, name='', smooth=None) (Constructor) |
New GeoidKarney interpolator. Arguments: `egm_pgm` - An EGM geoid dataset file name (`egm*.pgm`), see note below. `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`, Ellipsoid, Ellipsoid2 or a_f2Tuple), 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`. `TypeError` - Invalid `datum`. Overrides: object.__init__ See Also: Class GeoidPGM and function egmGeoidHeights. Note: Geoid file `egm_pgm` remains open and must be closed by calling the `close` method or by using this instance in a `with GeoidKarney(...) as ...` context.

### __call__ (self, *llis, **wrap) (Call operator) |
Interpolate the geoid height for one or several locations. Arguments: `llis` - The location or locations (`LatLon`, ... or `LatLon`s). `wrap` - If `True`, wrap or normalize all `llis` locations (`bool`). Returns: A single interpolated geoid height (`float`) or a list or tuple of interpolated geoid heights (`float`s). Raises: `GeoidError` - Insufficient number of `llis`, an invalid `lli` or the `egm*.pgm` geoid file is closed. `RangeError` - An `lli` is outside this geoid's lat- or longitude range. Overrides: heights._HeightsBase.__call__

### height (self, lats, lons, **wrap) |
Interpolate the geoid height for one or several lat-/longitudes. Arguments: `lats` - Latitude or latitudes (`degrees` or `degrees`s). `lons` - Longitude or longitudes (`degrees` or `degrees`s). `wrap` - If `True`, wrap or normalize all `lats` and `lons` locations (`bool`). 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` or the `egm*.pgm` geoid file is closed. `RangeError` - A `lat` or `lon` is outside this geoid's lat- or longitude range. Overrides: heights._HeightsBase.height

### highest (self, LatLon=None, full=False) |
Return the location and largest height of this geoid. Arguments: `LatLon` - Optional class to return the location and height (`LatLon`) or `None`. `full` - Search the full or limited latitude range (`bool`). Returns: If `LatLon` is `None`, a LatLon3Tuple`(lat, lon, height)` otherwise 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 lowest height of this geoid. Arguments: `LatLon` - Optional class to return the location and height (`LatLon`) or `None`. `full` - Search the full or limited latitude range (`bool`). Returns: If `LatLon` is `None`, a LatLon3Tuple`(lat, lon, height)` otherwise a `LatLon` instance with the lat-, longitude and height of the lowest grid location. Overrides: _GeoidBase.lowest

Property Details

### dtype Get the geoid's grid data type (`str`). Get method: dtype(self) - Get the geoid's grid data type (`str`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.