pyflwdir.FlwdirRaster.fillnodata#
- FlwdirRaster.fillnodata(data: ndarray, nodata: float, direction: Literal['up', 'down'] = 'down', how: Literal['min', 'max', 'sum'] = 'max') ndarray#
Fill no-data nodes with values from valid upstream or downstream neighbors.
- Parameters:
data (array-like) – Values associated with graph cells. Use a 1D array for Flwdir and an array matching the raster shape for FlwdirRaster.
direction ({'up', 'down'}, optional) – Direction in which to propagate values, downstream (‘down’, default) or upstream (‘up’).
how ({'min', 'max', 'sum'}, optional) – Method to merge values at confluences. By default ‘max’. Only used in combination with direction = ‘down’.
- Returns:
Data with no-data cells filled, with the same shape as data.
- Return type:
array