geoutils.operators.interpolator.Nearest#
- class geoutils.operators.interpolator.Nearest(neighborhood=None)[source]#
The Nearest interpolator selects the value closest to each requested coordinate.
An optional neighborhood limits the search to selected points or raster cells.
- __init__(neighborhood=None)#
Choose how nearby points or raster cells are selected.
- Parameters:
neighborhood (
PointNeighbours|GridNeighbours|None) – PointNeighbours for a point cloud or GridNeighbours for a raster. By default, the input type determines which to use (eight nearest points or a 3 x 3 window for a custom interpolator).
Methods
__init__([neighborhood])Choose how nearby points or raster cells are selected.
coefficients(data)Give the closest value a weight of one (the first value if several are equally close).
evaluate(data, *[, nodata_propagation])Check nodata and weights before predicting a value.
predict(data)Predict a value from the nearby source observations.
predict_batch(data, *[, nodata_propagation])Predict several values by calling evaluate() for each group of source observations.
Attributes
accepts_sample_weightsdefault_neighborhooddefault_nodata_propagationerror_structureinterpolation_orderminimum_inputs