semantique.processor.arrays.Array.fill#
- Array.fill(dimension, method, extrapolate=True, track_types=True, **kwargs)[source]#
Apply the fill verb to the array.
The fill verb fills nodata values by interpolating valid data values.
- Parameters:
dimension (
str
) – Name of the dimension along which to interpolate.method (
str
) – Interpolation method to use. One of nearest, linear or cubic. When interpolation along the stacked space dimensions, the two-dimensional versions of these interpolation methods are used, i.e. 2D nearest neighbour, bilinear and bicubic.extrapolate (
bool
) – Should nodata values at the edge be extrapolated? Only applied to one-dimensional interpolation.track_types (
bool
) – Should the value type(s) of the input(s) be checked, and the value type of the output be promoted, whenever applicable?**kwargs" – Additional keyword arguments passed on to the interpolation function. When interpolating along a single dimension, the interpolation function is
xarray.DataArray.interpolate_na()
. When interpolation along the stacked space dimension, the interpolation funtion isrioxarray.raster_array.RasterArray.interpolate_na()
.
- Returns:
- Raises:
exceptions.UnknownDimensionError – If a dimension with the given name is not present in the array.
exceptions.InvalidValueTypeError – If
track_types = True
and the value type of the array is not supported by the chosen interpolation method.