Frequently asked question

How does FILL work in ArcObjects and GeoProcessing?

Last Published: April 25, 2020


** Internal Publish Only! This article may contain information that is not intended for external circulation. **

In ArcInfo Workstation, the Fill command was an ARC Macro Language (AML). For ArcGIS version 9.0, the Fill function has been reworked into ArcObjects code. The following is pseudocode that can be used to see the algorithm the function now uses:
# preliminary processing
- Create a copy of the input surface raster (subsequently
referred to as the currently filled dataset).
- Compute FocalFlow using the input copy.
- Fill one-cell sinks using neighborhood cell addressing

# filling larger sinks
- Loop until no sink exists
- Compute FlowDirection
- Compute Sink using FlowDirection result
- Find number of sinks remaining (to decide if 'filling'
is finished)
- If not finished
- Compute Watershed using FlowDirection and Sink results
- Compute ZonalFill using Watershed result and currently
filled dataset
- Set any ZonalFill cellvalues to Z-Min if cells are NoData
- If zlimit is not used
- If filled dataset is < ZonalFill, update cell value
using ZonalFill result
- Else
- Compute ZonalMinimum using watershed result and filled
- Set any Zonalmin cellvalues to Z-Min if cells are
- Compute the difference dataset between ZonalFill and
ZonalMinimum results
- If filled dataset has cell values < ZonalFill and
difference dataset < Z-Limit
- Then update cell value using ZonalFill result
- Endif
- Endif
- End loop

Article ID:000006594

  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic