ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Eliminate

Available with Advanced license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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 those performed by Intersect and Union tools.

Illustration

Eliminate tool illustration

Usage

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

  • The Eliminate tool may not eliminate all selected features, depending on your dataset. Selected features cannot be merged with a neighboring selected feature. For example, a selected feature that is surrounded by other selected features, or only borders on other selected features cannot be merged. To eliminate the selected features that were not merged, select the features again and run the tool again.

    A selected feature that has no neighboring features with a common boundary cannot be merged.

  • The Input Layer parameter must include a selection; otherwise, the tool will fail.

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

Syntax

arcpy.management.Eliminate(in_features, out_feature_class, {selection}, {ex_where_clause}, {ex_features})
ParameterExplanationData Type
in_features

The layer with the polygons that will be merged with neighboring polygons.

Feature Layer
out_feature_class

The feature class to be created.

Feature Class
selection
(Optional)

Specifies whether the selected polygon will be merged with a polygon with the longest shared border or the largest area.

  • LENGTH —The selected polygon will be merged with the neighboring polygon with the longest shared border. This is the default.
  • AREA —The selected polygon will be merged with the neighboring polygon with the largest area.
Boolean
ex_where_clause
(Optional)

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

SQL Expression
ex_features
(Optional)

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

Feature Layer

Code sample

Eliminate example (Python window)

The following Python window script demonstrates how to use the Eliminate function 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 function.

# 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)

Environments

  • Current Workspace
  • Scratch Workspace
  • Output Coordinate System
  • Extent
  • XY Resolution
  • XY Tolerance
  • Output has M values
  • M Resolution
  • M Tolerance
  • Output has Z values
  • Default Output Z Value
  • Z Resolution
  • Z Tolerance
  • Qualified Field Names
  • Output CONFIG Keyword
  • Auto Commit
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Output XY Domain
  • Output M Domain
  • Output Z Domain

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Yes

Related topics

  • An overview of the Generalization toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal