I'm trying to use some Whitebox hydrology tools on a raster where I want to set inland points as areas of internal drainage and I don't understand how the fill tools treat NoData points when filling depressions. What I would expect is that all NoData areas are treated as outlet points, and so by setting a single inland pixel to NoData the cells immediately around it would drain into the NoData pixel, and therefore these would not be raised.

I have found that using both the "Fill depressions" and "Fill depressions Wang & Liu" tools the areas around a NoData pixel are still raised to overflow towards the edge of the raster, instead of draining into the NoData pixel. The pixel retains its null value in these cases, but the surrounding pixels are still affected and have a higher filled elevation than I want.

I also tried the "Fill depressions Planchon & Darboux" tool, and in this case the elevations are still raised to overflow and the NoData pixel is also given a value. The Planchon & Darboux description does specify that the tool assumes there are no interior NoData points, so I am not surprised that this specific tool did not work for me.

I have also found that the tools act differently than I expect at the coastline. Even at the edge of the data area in a raster, the flow directions will stay within the "land" pixels and travel parallel to the shore before eventually exiting.

All of this points to me not understanding how NoData areas act in conjunction with the fill tools. I am guessing that the tools only consider the edge of a raster to be a valid outlet, whereas I would like an approach which considers all NoData pixels to be outlets (whether inland or at the coast) in addition the raster edge. Is there a way that I can modify my input data to achieve this goal, or is there an alternative Whitebox approach that would work better to incorporate these sinks? And/or can anyone explain how NoData pixels are treated by the Whitebox fill tools?

If it makes a difference: I am using the basic Whitebox tools (in Python) for this purpose, not WbW (although WbW is great :) ).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.