pyflwdir.FlwdirRaster.moving_median#
- FlwdirRaster.moving_median(data, n, restrict_strord=False, strord=None, nodata=-9999.0)#
Take the moving median over the flow direction network
- Parameters:
data (2D array) – values
n (int) – number of up/downstream neighbors to include
restrict_strord (bool) – If True, limit the window to cells of same or smaller stream order.
strord (2D array of int, optional) – Stream order map.
nodata (float, optional) – Nodata values which is ignored when calculating the median, by default -9999.0
- Returns:
median data
- Return type:
2D array