- RTree.inverse_distance_weighting(coordinates: numpy.ndarray, radius: Optional[float] = None, k: Optional[int] = 9, p: Optional[int] = 2, within: Optional[bool] = True, num_threads: Optional[int] = 0) Tuple[numpy.ndarray, numpy.ndarray] #
Interpolation of the value at the requested position by inverse distance weighting method.
coordinates – a matrix
nis the number of observations and
ndimsis the number of coordinates in order: longitude and latitude in degrees, altitude in meters and then the other coordinates defined in Euclidean space if
dims> 3. If the shape of the matrix is
(n, ndims)then the method considers the altitude constant and equal to zero.
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
p – The power parameters. Defaults to
within – 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 to
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
The interpolated value and the number of neighbors used in the calculation.