Fill (Raster Analysis)

Summary

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

Illustration

Fill tool illustration

Usage

  • This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise Link to Understanding analysis in ArcGIS Enterprise portal that has an ArcGIS Image Server Link to What is ArcGIS Image Server configured for Raster Analysis Link to Configure and deploy raster analytics. When the tool is invoked, ArcGIS Pro serves as a client and the processing occurs in the servers federated with ArcGIS Enterprise. The portal tool accepts layers from your portal as input and creates output in your portal.

    The input raster layer supports a layer from the portal, a URI or URL to an image service, or the output from the Make Image Server Layer tool. This tool does not support local raster data or layers.

  • 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.

Syntax

arcpy.ra.Fill(inputSurfaceRaster, outputName, {zLimit})
ParameterExplanationData Type
inputSurfaceRaster

The input raster representing a continuous surface.

Raster Layer; Image Service; String
outputName

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 name already exists, you will be prompted to provide another name.

String
zLimit
(Optional)

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

Double

Derived Output

NameExplanationData Type
outputRaster

The output raster.

Raster Layer

Code sample

Fill example 1 (Python window)

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

import arcpy
arcpy.Fill_ra("https://myserver/rest/services/elevation/ImageServer","outFill1")
Fill example 2 (stand-alone script)

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

#---------------------------------------------------------------------------
# Name: Fill_example02.py
# 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

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

Related topics