Nearest Neighbor in Interpolations

Interpolation of data is needed in IRIS products that include a cross-section (XSECT). The HCLASS data are interpolated with a rule of the nearest neighbor.

In its simplest form, the HCLASS value in any point X along a straight line between the points A and B, in which the HCLASS data values are HCLASS(A) and HCLASS(B), is obtained in the parametrization:

X → ( t ) = A x → ( t ) + B → x ( 1 − t ) , when t ∈ [ 0 , 1 ]

H C L A S S ( X → ) = H C L A S S ( A → ) , when t ≤ 0.5

H C L A S S ( X → ) = H C L A S S ( B → ) , when t ≥ 0.5

This approach generalizes to interpolating in the N-dimensional data grid:

H C L A S S ( X → ) = H C L A S S ( A i → )

where A i → has the shortest distance to the data point X →

r i = | X → − A → i | = min ⁡ { r j = | X → − A → j | ,   w h e n ⁢     A j ∈ p r o x i m a t e ⁢ d a t a }