__init__ (self,
egm_pgm,
crop=None,
datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran...,
kind=3,
smooth=0,
**name)
(Constructor)
|
|
New GeoidPGM interpolator.
- Arguments:
egm_pgm - An EGM geoid dataset file name
(egm*.pgm).
crop - Optional box to crop egm_pgm, a 4-tuple
(south, west, north, east) or 2-tuple ((south,
west), (north, east)), 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), overriding WGS84.
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 - Optional geoid name=NN (str).
- Raises:
GeoidError - EGM dataset egm_pgm issue or invalid
crop, kind or
smooth.
ImportError - Package numpy or scipy not found or not
installed.
LenError - EGM dataset egm_pgm axis mismatch.
SciPyError - A scipy issue.
SciPyWarning - A scipy warning as exception.
TypeError - Invalid datum or unexpected argument.
- Overrides:
object.__init__
Notes:
-
Specify
kind=-1, -3 or -5 to use
scipy.interpolate.interp2d before or
scipy.interpolate.bisplrep/-ev since
Scipy version 1.14.
-
The GeographicLib egm*.pgm file sizes are based on a
2-byte
int height converted to 8-byte dtype
float64 for scipy interpolators. Therefore,
internal memory usage is 4 times the egm*.pgm file
size and may exceed the available memory, especially with 32-bit
Python. To reduce memory usage, set keyword argument
crop to the region of interest. For example
crop=(20, -125, 50, -65) covers the conterminous US (CONUS), less than 3% of the
entire egm2008-1.pgm dataset.
See Also:
Class GeoidKarney and function egmGeoidHeights.
|