11

Are there any open source or inexpensive tools to detect and fill sinks on a DEM? ArcGIS Spatial Analyst is just out of my price range.

closed as too broad by PolyGeo Dec 31 '18 at 0:28

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

14

GRASS has r.fill.dir and better yet, r.terraflow, which is one of the few hydrology tools to work on massive rasters. There's also TauDem, which includes PitRemove for filling.

  • I've also written a piece of software, RichDEM, which has a variety of fast (sometimes thousands of times faster) algorithms for depression filling and other hydrological applications. See: richdem.readthedocs.io/en/latest/depression_filling.html – Richard Feb 8 '18 at 22:57
  • TauDem is cross platform and works fine on Linux and OS X. – mankoff Feb 9 '18 at 0:19
  • @mankoff thanks for the update, that's great. Earlier releases were Windows only (I know 3.1 was, but perhaps later versions as well). Unfortunately the download page doesn't include references to it, but I do see a PPA containing it, along with a homebrew package. – scw Feb 13 '18 at 17:24
9

SAGA has several fill methods

http://www.saga-gis.org/saga_modules_doc/ta_preprocessor/index.html

Flat Detection
Sink Drainage Route Detection
Sink Removal
Fill Sinks (Planchon/Darboux, 2001)
Fill Sinks (Wang & Liu)
Fill Sinks XXL (Wang & Liu)

  • Note that the Planchon & Darboux (2001) method produces the same results as Wang & Liu (2006), just much, much slower. No one should use P&D if an alternative is available. Barnes (2014), Zhou (2016), and Wei (2018) improve on the speed of Wang & Liu (2006), collectively achieving a 6x or more speed-up. – Richard Feb 8 '18 at 22:59
4

This is actually an area of active research for me.

You can use the Priority-Flood algorithm as described by this journal article, which is also available on arXiv. This allows you to fill depressions in O(n log n) time for floating-point data and O(n) time for integer data. Source code is available here.

The foregoing algorithm is serial and works well up to a hundred million cells or so. Sometimes, though, your datasets are larger.

This article, also available on arXiv, describes an algorithm with excellent scaling suitable for datasets of up to a trillion or more cells. Source is available here.

All of the foregoing is now included in RichDEM's Python wrapper. Documentation, with examples and pretty pictures, is available here.

Depression-filling as performed on Beauford watershed

(Disclaimer: I wrote the articles and code mentioned above.)

1

Yeap, there is. I haven't tested yet, but I ran my eyes trough the source code. It seems a good program.

Whitebox

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

1

Landserf (free to use) - Click to Goto Homepage

I have used it, and love it.

I also think the algorithms are much more accurate in Landserf than in Arc, very very solid maths used and Jo Wood lists the maths used for his analysis.

Not the answer you're looking for? Browse other questions tagged or ask your own question.