pyinterp.core.geodetic.RTree.inverse_distance_weighting¶
- RTree.inverse_distance_weighting(self: pyinterp.core.geodetic.RTree, lon: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], lat: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], radius: SupportsFloat | None = None, k: SupportsInt = 9, p: SupportsInt = 2, within: bool = True, num_threads: SupportsInt = 0) tuple¶
 Interpolation of the value at the requested position by inverse distance weighting method.
- Parameters:
 lon – The longitude of the points, in degrees, to be interpolated.
lat – The latitude of the points, in degrees, to be interpolated.
radius – The maximum radius of the search (m). Defaults The maximum distance between two points.
k – The number of nearest neighbors to be used for calculating the interpolated value. Defaults to
9.p – The power parameters. Defaults to
2. within (bool, optional): If true, the method ensures that the neighbors found are located around the point of interest. In other words, this parameter ensures that the calculated values will not be extrapolated. Defaults totrue.within – If true, the method ensures that the neighbors found are located within the point of interest. Defaults to
false.num_threads – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to
0.
- Returns:
 The interpolated value and the number of neighbors used in the calculation.