Skip To Content

Eliminate

Available with Advanced license.

Summary

Eliminates polygons by merging them with neighboring polygons that have the largest area or the longest shared border. Eliminate is often used to remove small sliver polygons that are the result of overlay operations, such as Intersect or Union.

Illustration

Eliminate illustration

Usage

  • Features to be eliminated are determined by a selection applied to a polygon layer. The selection must be determined in a previous step by using Select Layer by Attribute, using Select Layer by Location, or querying a layer in a map.

  • Only selected polygons will be merged with a neighboring unselected polygon (by dropping the shared border). A selected polygon will not be merged with a neighboring selected polygon.

  • The Input Layer must include a selection; otherwise, Eliminate will fail.

  • The Exclusion Expression and Exclusion Layer are not mutually exclusive and can be used together to give full control over what is eliminated.

Syntax

Eliminate_management (in_features, out_feature_class, {selection}, {ex_where_clause}, {ex_features})
ParameterExplanationData Type
in_features

The layer whose polygons will be merged into neighboring polygons.

Feature Layer
out_feature_class

The feature class to be created.

Feature Class
selection
(Optional)

These options specify which method will be used for eliminating features.

  • LENGTHMerges a selected polygon with a neighboring unselected polygon by dropping the shared border. The neighboring polygon is the one with the longest shared border. This is the default.
  • AREAMerges a selected polygon with a neighboring unselected polygon by dropping the shared border. The neighboring polygon is the one with the largest area.
Boolean
ex_where_clause
(Optional)

An SQL expression used to identify features that will not be altered. For more information on SQL syntax see the help topic SQL reference for elements used in query expressions.

SQL Expression
ex_features
(Optional)

An input polyline or polygon feature class or layer that defines polygon boundaries, or portions thereof, that should not be eliminated.

Feature Layer

Code sample

Eliminate example (Python window)

The following Python window script demonstrates how to use the Eliminate tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/Portland.gdb/Census"
arcpy.MakeFeatureLayer_management("blockgrp", "blocklayer")
arcpy.SelectLayerByAttribute_management("blocklayer", "NEW_SELECTION", 
                                        '"Area_Sq_Miles" < 0.15')
arcpy.Eliminate_management("blocklayer", "C:/output/output.gdb/eliminate_output", 
                           "LENGTH", '"OBJECTID" = 9')
Eliminate example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the Eliminate tool.

# Name: Eliminate_Example2.py
# Description: Eliminate features based on a selection.
 
# Import system modules
import arcpy
 
# Set environment settings
arcpy.env.workspace = "C:/data/Portland.gdb/Census"
 
# Set local variables
inFeatures = "blockgrp"
tempLayer = "blocklayer"
expression = '"Area_Sq_Miles" < 0.15'
outFeatureClass = "C:/output/output.gdb/eliminate_output"
exclusionExpression = '"OBJECTID" = 9'
 
# Execute MakeFeatureLayer
arcpy.MakeFeatureLayer_management(inFeatures, tempLayer)
 
# Execute SelectLayerByAttribute to define features to be eliminated
arcpy.SelectLayerByAttribute_management(tempLayer, "NEW_SELECTION", expression)
 
# Execute Eliminate
arcpy.Eliminate_management(tempLayer, outFeatureClass, "LENGTH", 
                           exclusionExpression)

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: No
  • ArcGIS Desktop Advanced: Yes

Related topics