Skip To Content

Simplify By Straight Lines And Circular Arcs

Summary

Simplifies line features by replacing consecutive line segments with fewer line or circular arc segments, based on a specified, maximum allowable offset.

Illustration

Fit To Vertices and Fit To Segments
The output line is constructed by fitting straight line and circular arc segments within the specified maximum allowable offset.

Usage

    Caution:

    This tool modifies the input data. See Tools that do not create output datasets for more information and strategies to avoid undesired data changes.

  • This tool can be used to simplify the geometry of line features that have accumulated unwanted vertices or short segments from various data conversion and manipulation processes. Sequences of nonlinear segments can be replaced by two-point straight lines, and a series of segments representing arcs can be replaced by true curves. This tool will approximate and replace multiple segments with straight lines and circular arcs that fit within a specified maximum allowable offset.

  • Input features must be lines. The output line contains a subset of its original vertices. New vertices are not introduced; no features are deleted.

  • Existing parametric curves, such as Bézier curves, circular arcs, and elliptical arc segments will not be changed.

    Note:

    If the input lines are stored in a shapefile, circular arcs in the output line features will remain a densely populated series of small straight segments. Shapefiles do not support true curves. To derive true curves, export the shapefile to a feature class.

  • Choose Create circular arcs to generate true curves in addition to straight lines. The five optional parameters, Maximum Arc Angle Step, Minimum Number Of Vertices, Minimum Radius, Maximum Radius, and Minimum Arc Angle, control how circular arcs are fitted to segments.

    • Maximum Arc Angle Step (decimal degrees) is the maximum arc angle that can be used to construct circular arcs. The arc angle is the central angle of the candidate curve (or curve that is being constructed). The maximum arc angle step defines the upper limit of how wide the central angle search field can be when locating vertices to construct circular curves. If more than one vertex is found within each maximum arc angle step, these vertices will be considered for fitting to a circular arc. Use a smaller arc angle to fit circular arcs to densely distributed segments and to prevent the over-fitting of circular arcs to large segments. Use a larger arc angle to fit circular arcs to sparsely distributed segments. The valid value range is from 2 through 95 decimal degrees. The default is 20 decimal degrees.

      In the graphic below, a segment with a 90 degree central angle is considered for the fitting of a circular arc. If 89 degrees is specified as the maximum arc angle step, the segment is not considered and the output consists of a curve and a straight line (middle diagram). If 91 degrees is specified, the segment is used to construct the circular arc, and the output consist of a single curve (end diagram).

      Maximum Arc Angle Step
      Maximum Arc Angle Step is used to locate vertices to construct circular arcs.

    • Note:

      The Maximum Arc Angle Step parameter is not available if Fit to segments is chosen.

  • Choose Preserve endpoints for closed line to preserve the endpoints of a line that has coincident end points (loop). If Preserve endpoints for closed line is checked, the endpoints are preserved. If Preserve endpoints for closed line is unchecked, the endpoints may be moved or deleted.

Syntax

SimplifyByStraightLinesAndCircularArcs_edit (in_features, max_offset, {fitting_type}, {circular_arcs}, {max_arc_angle_step}, {min_vertex_count}, {min_radius}, {max_radius}, {min_arc_angle}, {closed_ends})
ParameterExplanationData Type
in_features

The line features to be simplified.

Feature Layer
max_offset

The maximum distance the output lines can deviate from the input line shapes. When Fit to vertices is chosen, the distance is measured between the original vertices and the output lines. When Fit to segments is chosen, the distance is measured between the input line segments and the output lines.

Linear Unit
fitting_type
(Optional)

Specifies how the output lines and circular arcs are fitted to the input line shapes.

If Fit to segments is chosen, the Maximum Arc Angle Step and Minimum Number Of Vertices parameters are not available.

  • FIT_TO_VERTICESMinimizes the offset gap between the output lines and the existing vertices. Output lines and curves will be fitted approximately to existing vertices. This is the default.
  • FIT_TO_SEGMENTS Minimizes the offset gap between the output lines and input line segments. Output lines and curves will be fitted approximately to existing segments.
String
circular_arcs
(Optional)

Controls whether or not circular arcs can be created.

  • CREATECircular arcs can be created. This is the default.
  • NOT_CREATECircular arcs cannot be created.
Boolean
max_arc_angle_step
(Optional)

The maximum arc angle step (decimal degrees) that is used to construct circular arcs. The arc angle defines how wide a visual field to use, for each step, when locating vertices to construct circular curves. The arc angle is the central angle of the candidate curve (or curve that is being constructed). If vertices are found within each maximum arc angle step, a circular arc is constructed. For example, if vertices and segments are sparse, a large arc angle step should be used. The valid value range is from 2 through 95 decimal degrees. The default is 20 decimal degrees. This parameter is not available if the Fit to segments option is chosen.

Double
min_vertex_count
(Optional)

The minimum number of vertices required for a circular arc to be created. The value must be greater than 3. The default is 4. This parameter is not available if the Fit to segments option is chosen.

Long
min_radius
(Optional)

The smallest allowable radius for output circular arcs. The value must be greater than 0 and smaller than the value specified for Maximum Radius. If no value is specified, the radius of output circular arcs are not checked (default).

Linear Unit
max_radius
(Optional)

The largest allowable radius for output circular arcs. The value must be greater than the value specified for Minimum Radius. If no value is specified, the radius of output circular arcs are not checked (default).

Linear Unit
min_arc_angle
(Optional)

The minimum arc angle (decimal degrees). The minimum arc angle is the smallest allowable central angle in the output circular arcs. If the central angle of any output circular arc is less than this value, it will not be created. The valid value range is from 2 through 360 decimal degrees. The default is 2 decimal degrees.

Double
closed_ends
(Optional)

Controls whether or not to preserve the endpoints of a closed line.

  • PRESERVEEndpoints for closed lines are preserved. This is the default.
  • NOT_PRESERVEEndpoints for closed lines are not preserved; they can be moved or deleted.
Boolean

Code sample

SimplifyByStraightLinesAndCircularArcs example 1 (Python window)

The following Python window script demonstrates how to use the SimplifyByStraightLinesAndCircularArcs function in immediate mode.

import arcpy
arcpy.SimplifyByStraightLinesAndCircularArcs_edit("C:/data.gdb/parcel_lines", "20 feet")

Licensing information

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

Related topics