Eliminate (Data Management)

Merges the selected polygons with neighboring polygons with the largest shared border or the largest area


Illustration

Eliminate illustration

Usage tips

Syntax

Eliminate_management (in_features, out_feature_class, selection)
Parameter Explanation Datatype
Input Layer (Required)

The layer whose polygons will be merged into neighboring polygons.

Feature Layer
Output Feature Class (Required)

The feature class to be created. There should be a smaller number of features than in the input layer.

Feature Class
Eliminating polygon by border (Optional)

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

  • LENGTH—Merges 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.
  • AREA—Merges a selected polygon with a neighboring unselected polygon by dropping the shared border. The neighboring polygon is the one with the largest area.

Boolean
Data types for geoprocessing tool parameters

Script Example

# EliminateSlivers.py
# Description: Eliminate all sliver polygons with area less than 10 square meters.
# Author: ESRI
# Date: 1/1/04

# Create the Geoprocessor object
import arcgisscripting, sys, string, os
gp = arcgisscripting.create()

myWorkspace = "c:/data/region.mdb"
myFeatures = "forest_area"

try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    gp.Workspace = MyWorkspace

    # Process: Make feature layer
    gp.MakeLayer_management(myFeatures, "eliminateLYR", "", "", "GRID_CODE GRID_CODE VISIBLE;geocompID geocompID VISIBLE;Shape_Length Shape_Length VISIBLE;Shape_Area Shape_Area VISIBLE")

    # Process: Select features from layer to be eliminated
    gp.SelectLayerByAttribute_management("eliminateLYR", "NEW_SELECTION", "[Shape_Area] < 10")

    # Process: Eliminate selected features into neighboring polygons with the largest shared border

    gp.Eliminate_management("eliminateLYR", myFeatures + "_out", "LENGTH")

except:
    # If an error occurred while running a tool print the messages
    print gp.GetMessages()

See Also

  • Dissolve (Data Management)
  • Eliminate (Coverage)