semantique.processor.arrays.Array.fill

Contents

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 is rioxarray.raster_array.RasterArray.interpolate_na().

Returns:

xarray.DataArray

Raises: