pygeodesy.geoids.GeoidG2012B

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

# Class GeoidG2012B

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

Geoid height interpolator for GEOID12B Model grids CONUS, Alaska, Hawaii, Guam and Northern Mariana Islands, Puerto Rico and U.S. Virgin Islands and American Samoa based on `SciPy` interpolation RectBivariateSpline, interp2d or bisplrep/-ev.

Instance Methods
__init__(self, g2012b_bin, datum=Datum(name='NAD83', ellipsoid=Ellipsoids.GRS80, transform=Tran`...`, kind=3, smooth=0, **name_crop) New GeoidG2012B interpolator. |
__call__(self, *llis, **wrap_H) Interpolate the geoid (or orthometric) height for one or more locations. |
height(self, lats, lons, **wrap) Interpolate the geoid height for one or several lat-/longitudes. |
Inherited from `_GeoidBase`: `__enter__`, `__exit__`, `__repr__`, `__str__`, `center`, `close`, `height_`, `highest`, `loweright`, `lowerleft`, `lowerright`, `lowest`, `outside`, `toStr`, `upperleft`, `upperright` Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toRepr`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `_GeoidBase`: `closed`, `cropped`, `dtype`, `endian`, `hits`, `kind`, `knots`, `mean`, `nBytes`, `name`, `pgm`, `sizeB`, `smooth`, `stdev`, `u2B` Inherited from `heights._HeightBase`: `numpy`, `scipy`, `scipy_interpolate` Inherited from `heights._HeightNamed`: `datum`, `kmin`, `wrap` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, g2012b_bin, datum=Datum(name='NAD83', ellipsoid=Ellipsoids.GRS80, transform=Tran`...`, kind=3, smooth=0, **name_crop) (Constructor) |
New GeoidG2012B interpolator. Arguments: `g2012b_bin` - A `GEOID12B` grid file name (`.bin`, see note). `datum` - Optional grid datum (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple), overriding `NAD83`. `kind` - `scipy.interpolate` order (`int`), use 1..5 for RectBivariateSpline or -1, -3 or -5 for bisplrep/-ev or interp2d `linear`, `cubic` respectively `quintic`, see note for more details. `smooth` - Smoothing factor for `kind=1..5` only (`int`). `name_crop` - Optional geoid `name=NN` (`str`) and UNSUPPORTED keyword argument `crop=None`. Raises: `GeoidError` - Invalid `crop`, `kind` or `smooth` or a `g2012b_bin` grid file issue. `ImportError` - Package `numpy` or `scipy` not found or not installed. `LenError` - Grid file `g2012b_bin` axis mismatch. `SciPyError` - A `scipy` issue. `SciPyWarning` - A `scipy` warning as exception. `TypeError` - Invalid `datum`. Overrides: object.__init__ Notes: Only use any of the `le` (little-endian) or `be` (big-endian) `g2012b*.bin` binary grid files. Specify `kind=-1, -3 or -5` to use `scipy.interpolate.interp2d` before or `scipy.interpolate.bisplrep/-ev` since `Scipy` version 1.14.

### __call__ (self, *llis, **wrap_H) (Call operator) |
Interpolate the geoid (or orthometric) height for one or more locations. Arguments: `llis` - One or several locations (each `LatLon`), all positional. `wrap_H` - Keyword arguments `wrap=False` (`bool`) and `H=False` (`bool`). Use `wrap=True` to wrap or normalize all `llis` locations. If `H is True`, return the orthometric height instead of the geoid height at each location. Returns: A single geoid (or orthometric) height (`float`) or a list or tuple of geoid (or orthometric) heights (each `float`). 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. `SciPyError` - A `scipy` issue. `SciPyWarning` - A `scipy` warning as exception. Overrides: heights._HeightNamed.__call__ Note: To obtain orthometric heights, each `llis` location must have an ellipsoid `height` or `h` attribute, otherwise `height=0` is used. See Also: Function pygeodesy.heightOrthometric.

### height (self, lats, lons, **wrap) |
Interpolate the geoid height for one or several lat-/longitudes. Arguments: `lats` - Latitude or latitudes (each `degrees`). `lons` - Longitude or longitudes (each `degrees`). `wrap` - Use `wrap=True` to wrap or normalize all `lats` and `lons`. Returns: A single geoid height (`float`) or a list of geoid heights (each `float`). Raises: `GeoidError` - Insufficient or unequal number of `lats` and `lons`. `RangeError` - A `lat` or `lon` is outside this geoid's lat- or longitude range. `SciPyError` - A `scipy` issue. `SciPyWarning` - A `scipy` warning as exception. Overrides: heights._HeightNamed.height