ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for 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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Smooth Polygon

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Smooths sharp angles in polygon outlines to improve aesthetic or cartographic quality.

Illustration

Smooth Polygon illustration

Usage

  • There are two smoothing methods to choose from:

    • The PAEK (Polynomial Approximation with Exponential Kernel) method smooths polygons based on a smoothing tolerance. Each smoothed polygon may have more vertices than its source polygon. The Smoothing Tolerance parameter controls the length of a "moving" path used in calculating the new vertices. The shorter the length the more detail that will be preserved and the longer the processing time.
    • The Bezier interpolation method (BEZIER_INTERPOLATION in Python) smooths polygons without using a tolerance by creating Bezier curves to match the input lines. If the output is a shapefile, the Bezier curves will be approximated, since true Bezier curves cannot be stored in shapefiles.
  • Smoothing may introduce topological errors such as polygon outline crossings. Use the Flag errors option (FLAG_ERRORS in Python) in the Handle Topological Errors parameter to identify these errors. Two fields will be added—InPoly_FID and SmoPlyFlag—to contain input feature IDs and topological errors. Values of 1 in the SmoPlyFlag field indicate a topology error; 0 (zero) indicates no error. The InPoly_FID field links the output polygons to their input polygons. The Flag errors option cannot be used within an edit session.

    Note:

    ArcGIS Pro allows these parameters to be set at anytime even though editing is always available.

  • Invalid (self-intersecting) geometry may be created during the smoothing process and will be repaired but not improved. For example, if a polygon self-crosses it will become a multipart polygon but will still appear self-crossing.

Syntax

SmoothPolygon_cartography (in_features, out_feature_class, algorithm, tolerance, {endpoint_option}, {error_option})
ParameterExplanationData Type
in_features

The polygon features to be smoothed.

Feature Layer
out_feature_class

The output polygon feature class to be created.

Feature Class
algorithm

Specifies the smoothing algorithm.

  • PAEK —Acronym for Polynomial Approximation with Exponential Kernel. It calculates a smoothed polygon that will not pass through the input polygon vertices. This is the default.
  • BEZIER_INTERPOLATION —Fits Bezier curves between vertices. The resulting polygon passes through the vertices of input polygons. This algorithm does not require a tolerance. Bezier curves will be approximated in shapefile output.
String
tolerance

Sets a tolerance used by the PAEK algorithm. A tolerance must be specified, and it must be greater than zero. You can specify a preferred unit; the default is the feature unit. You must enter a 0 as a placeholder when using the BEZIER_INTERPOLATION smoothing algorithm.

Linear unit
endpoint_option
(Optional)

Specifies whether or not to preserve the endpoints for isolated polygon rings. This option works with the PAEK algorithm only.

  • FIXED_ENDPOINT —Preserves the endpoint of an isolated polygon ring. This is the default.
  • NO_FIXED —Smooths through the endpoint of an isolated polygon ring.
Boolean
error_option
(Optional)

Specifies how the topological errors (possibly introduced in the process, such as line crossing or overlapping) will be handled.

  • NO_CHECK —Specifies not to check for topological errors. This is the default.
  • FLAG_ERRORS —Specifies to flag topological errors, if any are found.
String

Code Sample

SmoothPolygon Example (Python Window)

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

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

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

# Name: SmoothPolygon_Example2.py
# Description: Eliminate small islands before simplifying and smoothing lake boundaries
 
# Import system modules
import arcpy
from arcpy import env
import arcpy.cartography as CA
import arcpy.management as DM
 
# 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

  • Current Workspace
  • Default Output Z Value
  • Output M Domain
  • Output XY Domain
  • Output Coordinate System
  • Extent
  • Output has M values
  • Output has Z values
  • Scratch Workspace
  • XY Tolerance

Licensing Information

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

Related Topics

  • An overview of the Generalization toolset
  • Understanding conflict resolution and generalization
  • Automating conflict resolution and generalization workflows with geoprocessing
  • Smooth Line
  • Simplify Polygon
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal