Skip To Content



Fills sinks in a surface raster to remove small imperfections in the data.


Fill tool illustration


  • A sink is a cell with an undefined drainage direction; no cells surrounding it are lower. The pour point is the boundary cell with the lowest elevation for the contributing area of a sink. If the sink were filled with water, this is the point where water would pour out.

  • The z-limit specifies the maximum difference allowed between the depth of a sink and the pour point, and determines which sinks will be filled and which will remain untouched. The z-limit is not the maximum depth to which a sink can be filled.

    For example, consider a sink area where the pour point is 210 feet in elevation, and the deepest point within the sink is 204 feet (a difference of 6 feet). If the z-limit is set to 8, this particular sink will be filled. However, if the z-limit is set to 4, this sink will not be filled since the depth of this sink exceeds this difference and would be considered a valid sink.

  • All sinks that are less than the z-limit, and lower than their lowest adjacent neighbor, will be filled to the height of their pour points.

  • The number of sinks found with the z-limit will determine the length of processing time. The more sinks there are, the longer the processing time will be.


Fill_ra (inputSurfaceRaster, outputName, {zLimit})
ParameterExplanationData Type

The input raster representing a continuous surface.

Raster Layer; Image Service; String

The name of the output fill raster service.

The default name is based on the tool name and the input layer name. If the layer already exists, you will be asked to provide another name.


Maximum elevation difference between a sink and its pour point to be filled.


Code sample

Fill example 1 (Python window)

This example fills the sinks of an input elevation surface raster.

import arcpy
Fill example 2 (stand-alone script)

This example fills the sinks of an input elevation surface raster.

# Name:
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inSurface = "https://myserver/rest/services/elevation/ImageServer"
outputFill = "outFill2"
zLimit = 3.28

# Execute Fill raster analysis tool
arcpy.Fill_ra(inSurface, outputFill, zLimit)

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Image Server
  • ArcGIS Desktop Standard: Requires ArcGIS Image Server
  • ArcGIS Desktop Advanced: Requires ArcGIS Image Server

Related topics