ArcGIS Blog

Analytics

ArcGIS Pro

Filling sinks in DEMs like an expert

By Tania Lopez-Cantu

Introduction

Digital Elevation Models (DEMs) are used to understand hydrological characteristics of an area, such as the location of streams or watershed boundaries. The terrain represented in a DEM typically has local high points (peaks) and low points (valleys). Often, DEMs also include sinks. Sinks can be real landscape features captured by very high-resolution DEMs. They can also be erroneous elevation values that result from data noise, interpolation errors, or low spatial resolution. Sinks are problematic when computing hydrologic characteristics as they prevent water from flowing (Grimaldi et al., 2007; Lindsay, 2016; Lindsay & Creed, 2005), so they must be handled in some way. One solution is to fill them in so that water flow is not interrupted. The Spatial Analyst Fill tool can be used to fill sinks on a DEM so that water always finds an outlet.  

Figure 1 shows an elevation profile through a sink in a hypothetical DEM.

Single sink elevation profile
Figure 1. Elevation profile of a single sink.

Depending on the complexity of the terrain, sinks can be part of a nested structure that represents a larger depression area. A single sink is characterized by having a single lowest point whereas a nested sink can contain multiple low points within.  Figure 2 below shows an elevation profile that has several nested sinks.

Nested sinks elevation profile
Figure 2. Elevation profile of nested sinks.

 The Spatial Analyst Fill tool can be used to alter the DEM so that water always finds an outlet by iterating over all identified sinks that meet two conditions 

  1. Have depths within the range established by the Z limit parameter 
  2. Have a lower elevation value than their lowest adjacent neighbor 

In the following sections, we discuss the sink filling process for single and nested sinks, as well as an application of the Z limit optional parameter to fine-tune it. For a quick refresher on how the Fill tool works read How Fill works.

Iterative process to fill a sink 

The process to identify and fill a specific sink in the Fill tool is iterative. If a sink meets Conditions 1 and 2 (above), then it will be filled. The new elevation value will be equal to that of the sink outlet. For single sinks, it is equal to the lowest adjacent neighbor height. For nested sinks, it is the value of the outlet of the overall sink area.  

 

The sink outlet should not be confused with the watershed outlet. The sink outlet is the point where water flows out if the sink is filled, and the watershed outlet is the point where water concentrates after flowing downwards from an upslope area. For a refresher on common hydrology concepts (such as watershed, outlet, and so on), read Understanding drainage systems.

What is the Z limit parameter?

The Z limit parameter is used to decide which sinks will be filled. Leaving the Z limit parameter blank (default) will result in all sinks being filled. If a value is specified, it will be used to set the maximum difference allowed between a sink height and the overall sink area outlet height. For example, if Z limit is set to 1, assuming that the overall sink area outlet height is 1347 m, only sinks with depths between 1346 m and 1347 m will be filled. Any other sink that is out of this range will not be filled. If set to 2, then all sinks between 1345 m and 1347 m will be filled and so on.

Single and Nested sink fill process using Z limit parameter 

Using the Z limit equal to 2 example, a single sink (illustrated below in Figure 3) labeled (a) would be filled up to 1349 m which is the elevation value of the lowest adjacent neighbor. After having filled (a), the single sink labeled (b) would also meet the two conditions, and so it is also filled up to 1349 m.

Filling single sinks in a DEM
Figure 3. Single sinks are filled using the Fill tool up to the elevation value of the lowest adjacent neighbor.

The same iterative process is applied to nested sinks – the only difference is the elevation value up to which a sink is filled. For nested sinks, this value is that of the overall sink area outlet. Like in the previous example, after a single sink is filled, neighboring cells may now meet the necessary conditions to be filled and thus will be filled. This is the case of sink labeled (c) in Figure 4 below. After (b) has been filled, (c) now meets Condition 2 it has a lower elevation value than the lowest adjacent neighbor. Since it originally met Condition 1 (depth below the specified Z limit), it now meets both conditions, and it is filled. 

Filling sinks within a nested sink structure.
Figure 4. Sinks are filled using the Fill tool up to the elevation value of the sink outlet.

Note that the value of the Z limit parameter controls which sinks within the nested structure will be filled. If we increase the Z limit parameter value from 1 to 2, then other sinks and their neighbors meet the conditions, and they will be filled as shown in Figure 5 below. 

An example showing how sinks are iteratively filled.
Figure 5. Other sinks are filled using the Fill tool with Z limit = 2. All sinks that are filled with Z limit = 1 are also filled with Z limit = 2.

Summary

Sinks in elevation data must be handled in some way to obtain continuous streams and correctly delineated watersheds. If sinks are suspected to be spurious elevation data, the Fill tool can be used to alter the DEM so that water always finds an outlet. This tool fill sinks by iterating over those which meet two conditions: (1) they have a depth within the Z limit range, and (2) they are lower than the lowest adjacent neighbor. Using the Z limit parameter, you can decide which sinks in the DEM will be filled. Leaving the Z limit parameter blank (default) will result in all sinks in the DEM being filled. Specifying a value to the Z limit parameter will fill sinks differently depending on their complexity. For single sinks, the tool will fill them up to the lowest adjacent neighbor, whereas nested sinks will be filled up to the outlet of the overall sink area.

Share this article