Simplify Line Or Polygon (Coverage)
Summary
Simplifies a line or a polygon boundary by removing small fluctuations or extraneous bends from it while preserving its essential shape.
Illustration
Usage
-
If the input coverage already contains intersecting lines, or if you want a quick result and don't care about topological errors in the output coverage, use the default option, which is not to Check for topological errors. Any topological errors introduced by the process will not be checked and corrected. If the input coverage contains intersecting lines, and you choose to Check for topological errors, it will fail at the input data validation, and the program will terminate with a message: "Intersecting lines are found in in_cover. The program is terminated".
-
If the input coverage contains no intersecting lines, check the Check for topological errors option to find and avoid errors generated by the simplification process. If any topological errors are found, the involved arcs will be regeneralized using a reduced tolerance. The result will be checked for topological errors again. The process iterates until no more errors are found. With this option, the program will run much longer than with the default option.
-
Unless there is no input_coverage.AAT, the output_coverage.AAT will contain a new item, TOLFLAG, which stores the tolerance in decimal numbers used for each arc. Tolerances smaller than the Simplification Tolerance indicate arcs that are undersimplified to avoid topological errors.
-
If polygon topology exists for the input coverage, it is not preserved in the output coverage. The coverage PAT, however, is preserved. Build must be used to re-create polygon topology. If labels exit, they will be preserved. If a label falls outside the polygon boundary as the boundary is simplified, it will be moved just inside the nearest line segment of the polygon boundary.
-
If regions exist in the Input Coverage, regions in the Output Coverage will be preliminary regions. When Build is used to re-create the polygon topology, region topology will also be re-created.
-
The coordinate precision of the output coverage is determined by the current processing rule set by the derived precision environment setting. If the processing rule has not been established, the output coverage will be the same precision as the input coverage.
Syntax
Parameter | Explanation | Data Type |
in_cover |
The coverage containing arcs or polygons to be simplified. | Coverage |
out_cover |
The coverage to be created. The output coverage name must be different from the input coverage name. | Coverage |
simplification_tolerance |
Sets the tolerance in coverage units. A tolerance must be specified and must be greater than zero. | Double |
simplification_operator (Optional) |
Specifies the simplification operator.
| String |
ErrorCheck (Optional) |
Specifies whether to check for topological errors, including line-crossing, line-overlapping, zero-length lines, collapsed polygons, and holes falling outside of polygons.
| Boolean |
Code Sample
The following stand-alone script demonstrates how to simplify a lake coverage.
# Name: SimplifyLineOrPolygon_Example.py
# Description: Simplifies a lake coverage
# Requirements: ArcInfo Workstation
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inCover = "lakeshore"
outCover = "C:/output/cartolake"
simplificationTolerance = 110
simplificationOperator = "BEND_SIMPLIFY"
# Execute SimplifyLineOrPolygon
arcpy.SimplifyLineOrPolygon_arc(inCover, outCover, simplificationTolerance,
simplificationOperator, "")