Remove Small Lines (Topographic Production)

摘要

Removes lines that are shorter than a specified minimum length and do not connect to other features on one end.

插图

Remove Small Lines tool illustration

使用情况

    警告:

    此工具会修改输入数据。 有关详细信息以及避免数据被意外更改的策略,请参阅修改或更新输入数据的工具

    警告:

    A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is recommended that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.

  • This tool identifies small lines as line segments that are shorter than the Minimum Length parameter value and do not intersect or connect to other features at one end. The connecting or intersecting features can be in the same input line feature class or in any of the intersecting features' feature classes. In most scenarios, the tool only uses the length of an individual feature when determining the minimum length. In some scenarios, the tool only uses the length of a segment of the line or the length of multiple lines.

  • When the Recursive parameter is checked, all small lines that exist in the data, including small lines created as a result of removing the previous small lines, will be removed. This can result in the removal of a significant number of features in areas that primarily contain short line segments.

  • Overshoots exist if the start or end of a line extends a short distance past the intersection of another feature in the same feature class but the line is not split at the intersection. The tool considers overshoots that are shorter than the Minimum Length parameter value to be small lines, even if the entire length of the line is larger than the Minimum Length value. When overshoots are identified, the feature will be modified to remove the overshoot. When the tool runs, a message will be returned indicating the number of features that were modified.

  • Specifying the Maximum Angle parameter value may help when trying to keep small lines if multiple small lines connect to another feature and create a Y or T intersection. The angle for each small line is calculated as the declination of the small line from the continued path of the main line feature. For example, a T intersection in which the small line is perpendicular to the main road has a declination of 90 degrees, but a small line that continues in a straight line from the main road has a declination of 0.

  • When the Maximum Angle parameter value is specified, any small line with a declination angle larger than the Maximum Angle value will be removed. If multiple small lines have a declination that is smaller than the Maximum Angle value, the small line with the smallest declination may be kept.

  • When the Maximum Angle parameter value is specified , the final operation after any recursion is to determine if any of the small lines that were kept because they fall within the Maximum Angle value should be removed. In this case, the tool uses the overall length of the small line and connecting line features, not the length of the individual small line. If the length of the small line and any features it connects to, up to the first intersection, is shorter than the Minimum Length parameter value, the small line and connecting features will be removed. If the length of the combined features is longer than the Minimum Length value, the small line will be kept even though the individual feature is shorter than the Minimum Length value. This is because the geometries of small lines and connected features visually combine to create the appearance of a single segment that is longer than the Minimum Length value. You can run the Unsplit Line tool after the Remove Small Lines tool to combine the features into a single geometry that is longer than the Minimum Length value.

  • Features connected to any feature class specified by the Intersecting Features parameter are not considered small lines.

  • The integrity of the results of this tool relies on the topological integrity of the inputs. The following describe input data requirements and best practices:

    • Connectivity—Proper connections must exist at intersections that truly represent the connectivity of the network.
    • Intersecting features—Split lines at all true intersections, but not at overpasses and underpasses. Intersections that are not split in the appropriate place may produce unexpected results because the connectivity of the streets was not accurately assessed.
    • False dead ends—A false dead end is an unconnected segment that appears visually connected when symbolized at the final map scale. These may be areas where you expect connectivity based on visual appearance, but features are not actually connected. If you run the tool without repairing the connectivity, unexpected disconnects may be considered small lines and removed.
    • Empty or null geometry—The Input Features parameter value must consist of valid geometries. If necessary, use the Repair Geometry tool to repair the features.
    • Single-part features—Do not include multipart features in the Input Features parameter value. Use the Multipart To Singlepart tool or create a topology with a Must Be Single Part line rule to convert features to single-part features.
  • When the Split Input Lines parameter is checked, the tool will automatically split lines at intersections to ensure connectivity before determining if any small lines need to be removed. The results will not be split at intersections. If the tool determines a split feature will be removed, the original feature will be modified to remove only this portion of the line. If you know the topological integrity of the inputs is correct, ensure that this parameter is unchecked (split_input_lines = "NO_SPLIT" in Python) for faster processing.

  • During processing, a Some geometries are not split at intersections warning message may appear. Check the Split Input Lines parameter or run a tool such as Feature To Line to ensure the appropriate segmentation before running the tool.

  • During processing, a warning appears when one or more small lines are maintained because they have a declination that is smaller than the Maximum Angle parameter value, and some features smaller than the minimum length may remain in the resulting data. While the length of the individual features may be shorter than the minimum length, the overall visual length of the small line and connecting line features will be greater than the minimum length.

参数

标注说明数据类型
Input Features

The features that will have small lines removed.

Feature Layer
Minimum Length

The minimum length for input lines. Features shorter than this distance will be removed.

Linear Unit
Maximum Angle
(可选)

Any line below the minimum length that is within the defined angle of a consecutive line segment will be kept.

Long
Intersecting Features
(可选)

Additional intersecting features that the input features can be compared to when determining whether the feature is a small line.

Feature Layer
Recursive
(可选)

Specifies whether small lines on the line features will be removed.

  • Unchecked—All the small lines on lines will be removed. The remaining lines will not be analyzed to determine whether they are small lines. This is the default.
  • Checked—The small lines will be removed from the lines and the remaining lines will be analyzed to determine whether they are considered small lines. If they do not meet the Minimum Length value, they will be considered small lines and removed.
Boolean
Split Input Lines
(可选)

Specifies whether the input line features will be split at all intersections before determining the small lines to remove.

  • Checked—All lines in the input feature class will be split at intersections to ensure topological integrity. The length of the split features, not the original feature geometries, will be considered when applying the minimum length value to determine small lines. This is the default.
  • Unchecked—The lines will not be split before determining the lines to remove. The length of the input feature geometries will be used when applying the minimum length value to determine small lines.
Boolean

派生输出

标注说明数据类型
Output Layer

Features where small lines have been removed based on input criteria.

Feature Layer

arcpy.topographic.RemoveSmallLines(in_features, minimum_length, {maximum_angle}, {in_intersecting_features}, {recursive}, {split_input_lines})
名称说明数据类型
in_features

The features that will have small lines removed.

Feature Layer
minimum_length

The minimum length for input lines. Features shorter than this distance will be removed.

Linear Unit
maximum_angle
(可选)

Any line below the minimum length that is within the defined angle of a consecutive line segment will be kept.

Long
in_intersecting_features
[in_intersecting_features,...]
(可选)

Additional intersecting features that the input features can be compared to when determining whether the feature is a small line.

Feature Layer
recursive
(可选)

Specifies whether small lines on the line features will be removed.

  • NON_RECURSIVEAll the small lines on lines will be removed. The remaining lines will not be analyzed to determine whether they are small lines. This is the default.
  • RECURSIVEThe small lines will be removed from the lines and the remaining lines will be analyzed to determine whether they are considered small lines. If they do not meet the minimum_length value, they will be considered small lines and removed.
Boolean
split_input_lines
(可选)

Specifies whether the input line features will be split at all intersections before determining the small lines to remove.

  • SPLITAll lines in the input feature class will be split at intersections to ensure topological integrity. The length of the split features, not the original feature geometries, will be considered when applying the minimum length value to determine small lines. This is the default.
  • NO_SPLITThe lines will not be split before determining the lines to remove. The length of the input feature geometries will be used when applying the minimum length value to determine small lines.
Boolean

派生输出

名称说明数据类型
output_features

Features where small lines have been removed based on input criteria.

Feature Layer

代码示例

RemoveSmallLines example (stand-alone script)

The following stand-alone sample script demonstrates how to use the RemoveSmallLines function.

# Name: RemoveSmallLines_sample.py
# Description: Remove Small Lines removes unconnected lines less than
# a certain length unless within a defined angle.

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')

# Set workspace
arcpy.env.workspace = r'C:\data\LocalGovernment.gdb'

# Setting Local Variables
in_features = r'ReferenceData\RoadCenterline'
in_intersecting_features = r'ReferenceData\MedicalFacility'
in_featuresLyr = 'RoadL_Lyr'
in_intersecting_featuresLyr = 'MedicalFacility_Lyr'
minimum_length = '100 Feet'
maximum_angle = '45'
recursive = 'NON_RECURSIVE'

# Create an input feature layer for Remove Small Lines
arcpy.management.MakeFeatureLayer(in_features,in_featuresLyr)
arcpy.management.MakeFeatureLayer(in_intersecting_features, in_intersecting_featuresLyr)

# Execute Remove Small Lines
arcpy.topographic.RemoveSmallLines(in_featuresLyr,minimum_length,maximum_angle,in_intersecting_featuresLyr,recursive)

# Check In Extensions
arcpy.CheckInExtension('Foundation')

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 否
  • Standard: 需要 Production Mapping
  • Advanced: 需要 Production Mapping

相关主题