Package pygeodesy :: Module heights :: Class HeightIDW
[frames] | no frames]

Class HeightIDW

 object --+    
          |    
_HeightBase --+
              |
             HeightIDW

Height interpolator using Inverse Distance Weighting (IDW).

The distance is either the Euclidean or Haversine angular distance from function euclidean_ respectively haversine_.


See Also: IDW, SHEPARD_INTERP_2D and function euclidean_.

Instance Methods
 
__init__(self, knots, adjust=True, beta=2)
New HeightIDW interpolator.
 
__call__(self, *llis)
Interpolate the height for one or several locations.
 
height(self, lats, lons)
Interpolate the height for one or several lat-/longitudes.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, knots, adjust=True, beta=2)
(Constructor)

 

New HeightIDW interpolator.

Parameters:
  • knots - The points with known height (LatLons).
  • adjust - Set adjust=None to use the haversine_ distance. Set adjust=True or False for the euclidean_ distance and adjust the longitudinal delta by the cosine of the mean latitude for adjust=True.
  • beta - Inverse distance power (int 1, 2, or 3).
Raises:
  • HeightError - Insufficient number of knots or invalid knot, adjust or beta.
Overrides: object.__init__

__call__(self, *llis)
(Call operator)

 

Interpolate the height for one or several locations.

Parameters:
  • llis - The location or locations (LatLon, ... or LatLons).
Returns:
A single interpolated height (float) or a list or tuple of interpolated heights (floats).
Raises:
  • HeightError - Insufficient number of llis or invalid lli.
Overrides: _HeightBase.__call__

height(self, lats, lons)

 

Interpolate the height for one or several lat-/longitudes.

Parameters:
  • lats - Latitude or latitudes (degrees or degreess).
  • lons - Longitude or longitudes (degrees or degreess).
Returns:
A single interpolated height (float) or a list of interpolated heights (floats).
Raises:
  • HeightError - Insufficient or non-matching number of lats and lons.