pyflwdir.FlwdirRaster.upscale_error#
- FlwdirRaster.upscale_error(other: FlwdirRaster, idxs_out: ndarray) ndarray[source]#
Return an error map for the upscaled flow directions.
A flow direction is valid when the first outlet pixel downstream of a cell’s outlet is located in the cell indicated by that flow direction.
The returned values are 1 for valid links, 0 for erroneous links, and 255 for cells with missing flow-direction data.
- Parameters:
other (FlwdirRaster) – Upscaled flow-direction raster to check.
idxs_out (2D array of int) – Linear indices of the high-resolution outlet cells for other.
- Returns:
flwerr – Error map: 1 for valid links, 0 for erroneous links, and 255 for no-data.
- Return type:
2D array of uint8 with other.shape