Simplify Polygon (Cartography)

License Level:BasicStandardAdvanced

Summary

Simplifies polygons by removing extraneous bends while preserving essential shape.

Illustration

Polygon simplification

Usage

Syntax

SimplifyPolygon_cartography (in_features, out_feature_class, algorithm, tolerance, {minimum_area}, {error_option}, {collapsed_point_option})
ParameterExplanationData Type
in_features

The polygon features to be simplified.

Feature Layer
out_feature_class

The output polygon feature class to be created.

Feature Class
algorithm

Specifies the polygon simplification algorithm.

  • POINT_REMOVEKeeps the so-called critical points that depict the essential shape of a polygon and removes all other points. This is the default.
  • BEND_SIMPLIFYKeeps the main shape of a polygon and removes extraneous bends in the boundary.
String
tolerance

The tolerance that determines the degree of simplification. A tolerance must be specified, and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

  • For POINT_REMOVE algorithm, the tolerance you specify is the maximum allowable offset.
  • For BEND_SIMPLIFY algorithm, the tolerance you specify is the length of the reference bend baseline.
Linear unit
minimum_area
(Optional)

Sets the minimum area for a simplified polygon to be retained. The default value is zero, that is, to keep all polygons. You can choose a preferred unit for the specified value; the default is the feature unit.

Areal unit
error_option
(Optional)

Specifies how the topological errors (possibly introduced in the process, including line crossing, line overlapping, and collapsed zero-length lines) will be handled.

  • NO_CHECKSpecifies not to check topological errors. This is the default.
  • FLAG_ERRORSSpecifies to flag topological errors if any are found.
  • RESOLVE_ERRORSSpecifies to resolve topological errors if any are found.
String
collapsed_point_option
(Optional)

Specifies whether to keep collapsed zero-area polygons as points if any are found in the process. This option applies only when NO_CHECK or FLAG_ERRORS is specified.

  • KEEP_COLLAPSED_POINTSSpecifies to keep the collapsed zero-area polygons as points. The endpoints of the collapsed polygon boundaries will be stored in a point feature class at the output feature class location, taking the name of the output feature class plus a suffix _Pnt. This is the default.
  • NO_KEEPSpecifies not to keep the collapsed zero-area polygons as points even if they are found in the process; therefore, the point feature class will be empty.
Boolean

Code Sample

SimplifyPolygon Example (Python Window)

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

import arcpy
from arcpy import env
import arcpy.cartography as CA
env.workspace = "C:/data"
CA.SimplifyPolygon("soils.shp", "C:/output/output.gdb/simplified_soils", "POINT_REMOVE", 100)
SimplifyPolygon Example 2 (stand-alone script)

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

# Name: SimplifyPolygon_Example2.py
# Description: Eliminate small islands before simplifying and smoothing lake boundaries
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env
import arcpy.management as DM
import arcpy.cartography as CA
 
# Set environment settings
env.workspace = "C:/data/Portland.gdb/Hydrography"
 
# Set local variables
inLakeFeatures = "lakes"
eliminatedFeatures = "C:/data/PortlandOutput.gdb/lakes_eliminated"
simplifiedFeatures = "C:/data/PortlandOutput.gdb/lakes_simplified"
smoothedFeatures = "C:/data/PortlandOutput.gdb/lakes_smoothed"

# Eliminate small islands in lake polygons.
DM.EliminatePolygonPart(inLakeFeatures, eliminatedFeatures, 100, "OR", 0, "CONTAINED_ONLY")
 
# Simplify lake polygons.
CA.SimplifyPolygon(eliminatedFeatures, simplifiedFeatures, "POINT_REMOVE", 50, 200, "RESOLVE_ERRORS", "KEEP_COLLAPSED_POINTS", "CHECK")
 
# Smooth lake polygons.
CA.SmoothPolygon(simplifiedFeatures, smoothedFeatures, "PAEK", 100, "FLAG_ERRORS")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
3/3/2014