FillSingleCellPits vs FillDepressions

54 views
Skip to first unread message

Hugh Allan

unread,
Aug 30, 2022, 7:49:48 PM8/30/22
to WhiteboxTools
I'm currently extracting streams from a DEM using D8 flow accumulation and pointer grids in R, and finding my flow accumulation grids are terminating in what I assume to be depressions. I'm trying combinations of using FillDepressions, BreachDepressionsLeastCost with various fill values, thinking I would have cleaned the DEM enough, but apparently not.

So the WhiteboxTools User Manual says that FillSingleCellPits "can be a useful pre-processing technique before running one of the more robust depression breaching (BreachDepressions) or filling (FillDepressions) techniques, which are designed to remove larger depression features." Unlike the "more robust" functions, FillSingleCellPits doesn't accept any max_depth, or similar, arguments, so I'm just wondering how it differs from FillDepressions.

Specifically:
a) is there any point running FillSingleCellPits if I am going to run FillDepressions afterwards?,
b) if so, what's the difference between the two functions?
c) based on the manual, I assume it's best to use FillSingleCellPits before BreachDepressions/FillDepressions?

Thanks a lot
Hugh

Jean-François Bourdon

unread,
Aug 31, 2022, 3:30:19 PM8/31/22
to WhiteboxTools
FillSingleCellPits, as the name say, is really only filling cells that are lower than all their neighbors. The new value will be 0.0001 unit over the cell's lowest neighbor. It must be noted that the tool can generate new pits as the new lowest neighbor might became itself a pit if it is part of a larger depression (I often see this with elevation data inside water bodies). Personally, I don't any gain in running this tool before FillDepressions as the later won't limit itself to single cell depressions (without any significative performance hit overall).

As for using FillSingleCellPits before BreachDepressions, this isn't necessary if you use the --fill_pits flag. Doing so will prefill all single cell pits before breaching the remaining depressions. This time however, pits are filled to the same elevation of the lowest neighbor instead of overfilled by 0.0001 unit (this slight change is not significant).

Hugh Allan

unread,
Oct 6, 2022, 11:30:39 PM10/6/22
to WhiteboxTools
Thanks for the info Jean, that makes a bit more sense now; apologies for going quiet on this thread for a while.


I'm still having issues with extracting streams from my DEMs though. Specifically, I get a warning message when running wbt_d8_flow_accumulation():

**********************************************************************************
WARNING: Interior pit cells were found within the input DEM. It is likely that the
            DEM needs to be processed to remove topographic depressions and flats prior to
            running this tool.
********************************************************************************** 

This seems strange because the input DEM has been through both wbt_fill_depressions() and wbt_breach_depressions_least_cost(). And as the warning suggests, the resulting raster is just a series of incomplete, prematurely terminating streams rather than the correct stream network.  

I've tried re-filling and re-breaching the DEMs before wbt_d8_flow_accumulation() but again get the same warning message and an incomplete stream network.


Any ideas why this might be happening?

Hugh Allan

unread,
Oct 12, 2022, 7:22:54 PM10/12/22
to WhiteboxTools
And I have run the same processes through the WhiteBox Runner and getting the same warning message and incomplete stream network.
Reply all
Reply to author
Forward
0 new messages