Smooth Polygon (Data Management) (ArcInfo only) |
|
|
Release 9.3
Last modified March 8, 2012 |
|
NOTE: This topic was updated for 9.3.1.
Smooths a polygon to improve its aesthetic or cartographic quality
Illustration
Usage tips
The Polynomial Approximation with Exponential Kernel (PAEK) algorithm produces smoothed polygons; each may have more vertices than its source line. The tolerance you specify is the length of a "moving" path used in calculating the new vertices. The longer the length, the more smoothed the polygon. A small tolerance will result in a long processing time, so begin with a relatively large tolerance and a small number of features.
The BEZIER_INTERPOLATION algorithm does not require any tolerance. If you are using the command line or scripting, you still need to enter zero in place of the smooth_tolerance.
When BEZIER_INTERPOLATION is used for shapefile output, it will produce shapes very close to Bezier curves, since a shapefile cannot store true Bezier curves.
Both algorithms may introduce topological errors, such as line crossing or overlapping, in the results. If you are not concerned about the topological errors, use the default NO_CHECK option. If you want to know about the errors, use the FLAG_ERRORS option. The FLAG_ERRORS option preserves shared polygon boundaries and detects topological errors possibly introduced by smoothing. The polygon output will contain two new fields, InPoly_FID and SmoPlyFlag. The InPoly_FID field carries the feature IDs of the input polygons; the SmoPlyFlag field flags polygons with a value of 1, indicating topological errors, or a value of 0, indicating no errors.
The two algorithms used in this tool are the same as those used in the Smooth Line tool. See "related topics" above.
Invalid (self-intersecting) geometry may be created during the smoothing process and will be repaired. For example, if a polygon crosses itself, the polygon will be repaired to become a multiple-part polygon such that no part crosses any other part, although the polygon will still look self-crossing.
The FLAG_ERRORS option of this tool is not supported in an edit session.
The following environment settings affect this tool: XY tolerance, Extent, M domain, Coordinate system, Output has M values, Output has Z values, Default Z value, Output XY domain, workspace, and scratch workspace.
Command line syntax
An overview of the Command Line window
SmoothPolygon_management <in_features> <out_feature_class> <PAEK | BEZIER_INTERPOLATION> <tolerance> {FIXED_ENDPOINT | NOT_FIXED} {NO_CHECK | FLAG_ERRORS}
| Parameter | Explanation | Data Type |
| <in_features> |
The polygon features to be smoothed. |
Feature Layer |
| <out_feature_class> |
The output polygon feature class to be created. |
Feature Class |
| <PAEK | BEZIER_INTERPOLATION> |
Specifies the smoothing algorithm.
|
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. |
Linear Unit |
| {FIXED_ENDPOINT | NOT_FIXED} |
Specifies whether or not to preserve the endpoints for isolated polygon rings. This option works with the PAEK algorithm only.
|
Boolean |
| {NO_CHECK | FLAG_ERRORS} |
Specifies how the topological errors (possibly introduced in the process, such as line crossing or overlapping) will be handled.
|
String |
smoothpolygon wetlands smoothed_wetlands BEZIER_INTERPOLATION 0.0
Scripting syntax
About getting started with writing geoprocessing scripts
SmoothPolygon_management (in_features, out_feature_class, algorithm, tolerance, endpoint_option, error_option)
| Parameter | Explanation | Data Type |
| in_features (Required) |
The polygon features to be smoothed. |
Feature Layer |
| out_feature_class (Required) |
The output polygon feature class to be created. |
Feature Class |
| algorithm (Required) |
Specifies the smoothing algorithm.
|
String |
| tolerance (Required) |
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. |
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.
|
Boolean |
| error_option (Optional) |
Specifies how the topological errors (possibly introduced in the process, such as line crossing or overlapping) will be handled.
|
String |
# Simplifying soil polygons followed by smoothing
import arcgisscripting
gp = arcgisscripting.create()
# Set the workspace
gp.workspace = "d:/data/mapDB.mdb/soils"
# Simplifying soil polygons followed by smoothing
gp.simplifypolygon("soilpolys", "soilpolys_simplified", "BEND_SIMPLIFY", "80", "RESOLVE_ERRORS")
gp.smoothpolygon("soilpolys_simplified", "soilpolys_smoothed", "PAEK", "150", "FLAG_ERRORS")