DEM Sink Correction in ArcGIS Pro: Why Depression Filling Matters Before Flow Modelling

Figure 1: The same synthetic terrain before and after sink correction. Red dots mark sink cells; blue lines mark flow accumulation. Synthetic data, drawn for illustration.
| Guide at a glance | |
| Task | Find and remove sinks in a DEM so that water can be routed to the edge of the surface |
| Software | ArcGIS Pro 3.x, Spatial Analyst (Sink, Fill, Flow Direction, Flow Accumulation). Menu and parameter names follow Esri documentation for 3.x and can differ in other releases |
| Input | A DEM with a known cell size, projected coordinate system and vertical units |
| Output | A hydrologically conditioned DEM, ready for flow direction, streams and watersheds |
| Key decision | Whether to fill every sink, or to set a z limit so that deep, genuine depressions are left alone |
All the hydrological products derived from a raster surface rely on one assumption: water within any cell can flow towards the edge of the map. Real DEMs continually violate that assumption. Slight variations in elevation and rounding and the maximum limits of the sensor allow for single cells to be lower than their surrounding eight cells and water entering those cells has no where to go. DEM Sink Filling will fix this. It’s short, inexpensive, easy to ignore and if you ignore it while it’s running, all that’s built on top is ruined. This guide describes what sink are, how to identify them and to correct them using Fill Sinks in ArcGIS Pro, how to select a z limit, and the results that a computed experiment will provide regarding the consequences.
READ MORE: Powerful Digital Elevation Model for Accurate GIS Mapping
1. What a Sink Is, and Why It Appears
According to Esri, a sink is a cell (or set of connected cells) where there is no way of assigning one of the eight possible D8 values. This occurs if all of the neighbours are higher or if two cells are draining into one another in a loop. The edge of the sink’s contributing area has a lowest cell, called the pour point, which is the level at which the depression would overflow. The difference between the pour point and deepest cell is the sink depth (see Figure 2)

Figure 2: A sink in cross-section. Fill raises every cell in the depression up to the pour-point level so that flow can leave.
Sinks arise for three reasons, and the reason decides the treatment.
| Origin | Typical examples | Treatment |
| Data artefacts | Vertical error, rounding of heights to whole units, interpolation from sparse points, resampling | Fill. These are the majority and are almost always shallow |
| Real depressions that drain | A pond edge, borrow pit or culvert-fed hollow that overflows in wet seasons | Decide case by case; fill when the model should treat it as a flow-through feature |
| Real closed basins | Karst sinkholes, quarries, glacial kettles, playas and endorheic basins | Often leave unfilled with a z limit, or treat as separate sinks that store water |
Esri’s runoff workflow recommends hydrologic conditioning of this kind first: identify the sinks, which may come from data errors or from natural features such as karst, and fill them where appropriate before computing flow direction.
2. Why Depression Filling Matters Before Flow Modelling
A sound Hydrological Analysis Using GIS cannot be conducted on a DEM that hasn’t been corrected. Cells are assigned to their steepest downslope cell, the number of cells feeding into a cell are counted, streams are drawn where the accumulation is high, and watersheds are divided from stream mouths or gauge points. The chain is broken at the very first link by a sink. Water is diverted into a dead end upstream of it, there is no flow accumulation, streams are broken up, and watershed boundaries are established around the fragments instead of around actual catchments.
The effect is cumulative and silent. The software does not raise an error, the output looks like a stream network, and the mistake appears later as a catchment that is too small, a channel that vanishes mid-hillside or a flood volume that is wrong. This is the reason DEM Preprocessing for Watershed Analysis deserves a written step in every project method statement.
READ MORE: GIS and Remote Sensing Techniques for Insights

Figure 3: Where sink correction sits in a hydrology workflow.
3. Digital Elevation Model Processing: Preparing the Surface
Careful Digital Elevation Model Processing begins before any sink tool is run. A short checklist avoids the most common failures.
- Project the DEM into a coordinate system with linear units so that slopes and flow lengths are meaningful.
- Check vertical units and cell size, and record them. Fill depths are expressed in the vertical units of the DEM.
- Clip to the study area plus a buffer. Flow near the edge of a DEM behaves differently from flow in the interior, because water leaves the surface there. A catchment cut exactly along the clip boundary can lose part of its upstream area.
- Know the data type. Integer DEMs produce integer fills; a 1 m integer surface cannot represent a 0.2 m depression.
- Plan the disk space. Fill can be heavy on memory, CPU and disk, and Esri notes it may need up to four times the input’s disk space for temporary files.
4. Finding Sinks Before You Fill Them
Before any DEM Sink Filling, Esri’s recommended workflow is to identify the sinks first, look at their depths, choose a z limit and only then run Fill. It takes three tools.
- Flow Direction on the original DEM, using the default D8 method. D8 sends each cell to its steepest downslope neighbour and writes integer codes between 1 and 255; when drops are equal in several directions the codes are added, so right (1) plus down (4) gives 5. Leave Force all edge cells to flow outward unchecked (NORMAL) unless the project needs every edge cell to drain off the surface.
- Sink on that flow direction raster. The input must be a D8 flow direction raster. The output is an integer raster in which each sink has a unique value, numbered from 1 up to the number of sinks, so counting the sinks tells you how large the problem is.
- Compare depths. Run Fill with no z limit, subtract the original DEM from the result, and read the maximum of the difference inside each sink. That gives a depth for every depression and shows which are rounding artefacts and which are real features.
Esri also documents an optional Drop raster on Flow Direction, expressed as a percentage. A single-cell pit that is lower than all eight neighbours takes the value of its lowest neighbour in the output, so one-cell sinks are filtered as noise, but larger sinks are not.
5. Fill Sinks in ArcGIS Pro: Parameters and Behaviour
The Fill tool is in the Spatial Analyst Hydrology toolset and needs a Spatial Analyst licence. In ArcGIS Pro you can open it from the Analysis tab through Tools, then search for Fill. It has three parameters.
| Parameter | Meaning |
| Input surface raster | The DEM to condition |
| Z limit (optional) | The maximum elevation difference between a sink and its pour point for the sink to be filled. Must be greater than zero. If omitted, all sinks are filled |
| Output surface raster | The conditioned DEM. An integer input gives an integer output |
Fill removes sinks and does not remove peaks. If spurious peaks are also an issue, as described by Esri, use the Invert tool to transform the DEM, then use the Fill tool and Invert tool to get the original DEM back. The parallel processing setting determines the amount of multi-core used, defaulting to 50 percent of cores.
There is one more word of WARNING about timing. Fill alters the elevation of cells, sometimes metres, and eliminates very low gradient details which allow water bodies to appear on flat areas. Always preserve the original DEM, with the conditioned surface clearly named, such as dem_filled_z2m, to allow processing history to be seen by everyone accessing the project.
6. A Computed Experiment: What Fill Does to a Drainage Network
To show the consequence of skipping this stage of Digital Elevation Model Processing, we built a synthetic DEM of 160 by 160 cells (30 m cells) from a tilted surface, a broad valley, smooth relief and fine-scale random texture of about 2 m standard deviation, with two small depressions added. We then ran our own implementation of D8 flow direction and accumulation on the raw surface, on a z-limited fill and on a complete fill. The numbers below are from this calculation and not from ArcGIS Pro output, and the z limit logic is an approximation of Esri’s description.

Figure 4: Sinks in the raw DEM (A), the fill depth added (B), and flow accumulation before (C) and after (D) the fill. Synthetic data.
| Surface | Sink cells | Drains to edge | Largest accumulation | Stream pieces |
| Raw DEM | 100 | 31% | 1,673 cells | 41 |
| Fill with z limit 2 m | 11 | 76% | 9,214 cells | 20 |
| Fill, no limit | 0 | 100% | 15,160 cells | 14 |
In this test, the raw surface held 100 sink cells in 83 separate depressions. Only 31 percent of cells sent water to the edge of the DEM; the rest ended in pits. The largest drainage area was 1,673 cells, and the channel network (cells with at least 150 upstream cells) was cut into 41 pieces. After a complete fill, every cell drained to the edge, the largest drainage area rose about nine-fold to 15,160 cells, and the network fell to 14 connected pieces.

Figure 5: Most depressions are shallow (left); drainage continuity rises from 31% to 100% after filling (right). Synthetic data.
The depth histogram carries the key message for choosing a z limit. Of the 83 depressions, 78 were no deeper than 1 m, the median was 0.17 m and the 90th percentile was 0.76 m. They were noise. Only a few were deeper, with the largest at 3.9 m, and a z limit of 2 m left two of them in place. That left 11 sink cells and cut drainage continuity to 76 percent, which is exactly what a z limit should do when the deep depressions are real: they remain as sinks and the surrounding terrain is still repaired. When a depression is not real, the same limit leaves a hole in the network, so the decision needs a look at the feature itself, with imagery or a field check.
READ MORE: GIS Terrain Mapping Techniques for Better Insights
7. Choosing a Z Limit
| Situation | Suggested approach |
| Data artefacts only (lidar-derived or well-conditioned DEM, humid terrain) | Fill all sinks, or set a limit just above the vertical accuracy of the DEM |
| Mixed terrain with quarries, ponds or sinkholes | Run Sink first, map the depth of each depression, and set the limit below the depth of the real ones |
| Karst or endorheic basin | Leave the large sinks unfilled, and treat each as its own outlet in the analysis |
| Urban or engineered drainage | Fill natural sinks, but burn in culverts, pipes and channels where the DEM shows a false dam under a road |
| No information on DEM accuracy | Start with the depth histogram, pick the break between small and large, and test sensitivity with two limits |
Running Fill Sinks in ArcGIS Pro is the easy part; choosing the limit is the judgement. A sound rule is that the z limit should be at least as large as the vertical error of the DEM and smaller than the depth of any depression you believe is real. Where those two conditions conflict, the DEM is not suitable for the question, and better elevation data is a better fix than a cleverer tool setting.
8. Where Sink Correction Fits in a Watershed Workflow
After filling, the standard sequence of Hydrological Analysis Using GIS continues as follows.
- Flow Direction on the conditioned DEM gives a D8 raster in which every interior cell has a defined outlet.
- Flow Accumulation counts the cells that drain through each cell. Multi-flow-direction output needs a CRF raster, and Flow Accumulation can use it.
- Stream definition selects cells with enough accumulation, using a threshold chosen for the scale and climate of the study; further tools give flow length, stream links, stream order and stream features.
- Pour points are placed at stream mouths or gauges; a Snap Pour Point step may be needed to move them to the cell of highest accumulation.
- Watershed delineates the area draining to each pour point.
Each step inherits the quality of the one before it. This is the central reason DEM Preprocessing for Watershed Analysis is not optional: no later tool can recover drainage that has been broken at the DEM stage.
9. Common Problems
| Symptom | Likely cause | Fix |
| Streams stop mid-slope | Unfilled sink, or a z limit that left one | Run Sink on the conditioned DEM and inspect the remaining sinks |
| Fill alters a real pond or quarry | No z limit set | Use a z limit below the depth of real depressions |
| Parallel straight streams across flats | Filled areas are flat, so flow is assigned by tie-breaking | Check the flats, use a better DEM or enforce known channels |
| Fill tool runs out of disk or memory | Large raster, temporary files up to 4 times the input | Tile the DEM or free disk space and limit parallel processing |
| Small fill depths vanish | Integer DEM | Convert to a floating-point surface before filling |
| Watershed is much smaller than expected | Pour point not on a stream cell, or edge cut | Snap the pour point and buffer the DEM extent |
10. Limits of This Guide
Tool descriptions follow Esri’s documentation for ArcGIS Pro 3.x: Fill, Sink and Flow Direction. The experiment uses synthetic data and our own implementation of the algorithms, and its figures are drawn for this article. They are not screenshots, and the exact numbers will differ in ArcGIS Pro and on real terrain. In particular, the handling of flat areas after filling differs between implementations. Any Hydrological Analysis Using GIS is only as good as its conditioned surface, so check the conditioned DEM against imagery, known drainage lines and, where possible, observed flow records.
Conclusion
The hidden failure in hydrological modelling is the sinks. Most are superficial features, however a few are real features, and the same approach is used to process both: Flow Direction and Sink to detect features, examine the depths, select a z limit appropriate to the DEM’s accuracy and terrain, and then proceed with flow accumulation, streams and watersheds. A usable network was seen as drainage continuity improved from 31 percent to 100 percent after filling, compared to a set of fragments, and the largest drainage area increased ninefold after filling. DEM Sink Filling is then not housekeeping; it’s the root of all subsequent results and a good beginning to sound DEM PreProcessing for Watershed Analysis.
Simbi Labs India supports DEM processing, watershed delineation and hydrological modelling for water resources, infrastructure and environmental projects. To discuss a project, book a free consultation or write to grow@simbi.in.