Remove Small Lines (Topographic Production)

Resumen

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

Ilustración

Remove Small Lines tool illustration

Uso

    Precaución:

    Esta herramienta modifica los datos de entrada. Consulte Herramientas que modifican o actualizan los datos de entrada para obtener más información y estrategias para evitar cambios de datos no deseados.

    Precaución:

    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. Overshoots that are shorter than the Minimum Length parameter value are treated as small lines, even if the entire length of the line is longer 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.

  • Providing 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 provided, 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 provided , 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 will 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 provided for 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 identified as 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 will be removed. 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 that 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, the 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 shorter 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 longer than the minimum length.

Parámetros

EtiquetaExplicaciónTipo de datos
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
(Opcional)

Any line below the minimum length that is within the defined angle of a consecutive line segment will be kept. The angle value must be within the range of 0–180.

Long
Intersecting Features
(Opcional)

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

Feature Layer
Recursive
(Opcional)

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

  • Unchecked—All the small lines on line features 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 line features and the remaining lines will be analyzed to determine whether they are small lines. If they do not meet the Minimum Length value, they will be identified as small lines and removed.
Boolean
Split Input Lines
(Opcional)

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 used 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

Salida derivada

EtiquetaExplicaciónTipo de datos
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})
NombreExplicaciónTipo de datos
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
(Opcional)

Any line below the minimum length that is within the defined angle of a consecutive line segment will be kept. The angle value must be within the range of 0–180.

Long
in_intersecting_features
[in_intersecting_features,...]
(Opcional)

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

Feature Layer
recursive
(Opcional)

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

  • NON_RECURSIVEAll the small lines on line features 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 line features and the remaining lines will be analyzed to determine whether they are small lines. If they do not meet the minimum_length value, they will be identified as small lines and removed.
Boolean
split_input_lines
(Opcional)

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 used 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

Salida derivada

NombreExplicaciónTipo de datos
output_features

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

Feature Layer

Muestra de código

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')

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información de licenciamiento

  • Basic: No
  • Standard: Requiere Production Mapping
  • Advanced: Requiere Production Mapping

Temas relacionados