pyflwdir.FlwdirRaster.fillnodata#

FlwdirRaster.fillnodata(data, nodata, direction='down', how='max')#

Returns data where cells with nodata value have been filled with the nearest up- or downstream valid neighbor value.

Parameters:
  • data (2D array) – values

  • nodata (int, float) – missing data value

  • direction ({'up', 'down'}, optional) – direction of path, be default ‘down’, i.e. downstream

  • how ({'min', 'max', 'sum'}, optional.) – Method to merge values at confluences. By default ‘max’. Only used in combination with direction = ‘down’.

Returns:

filled data

Return type:

2D array