Back to Top
Summary
Removes lines that are shorter than a specified minimum length and do not connect to other features on one end.
Illustration
Usage
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.
(Video) ArcGIS Pro: TopologyWhen 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:
(Video) Making and labeling contour lines in ArcGIS Pro- 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.
Caution:
This tool modifies the input data. See Tools that modify or update the input data for more information and strategies to avoid undesired data changes.
Caution:
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.
Parameters
Label | Explanation | Data Type |
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 (Optional) | Any line below the minimum length that is within the defined angle of a consecutive line segment will be kept. | Long |
Intersecting Features (Optional) | Additional intersecting features that the input features can be compared to when determining whether the feature is a small line. | Feature Layer |
Recursive (Optional) | Specifies whether small lines on the line features will be removed.
| Boolean |
Split Input Lines (Optional) | Specifies whether the input line features will be split at all intersections before determining the small lines to remove.
| Boolean |
Derived Output
Label | Explanation | Data Type |
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})
Name | Explanation | Data Type |
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 (Optional) | 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,...] (Optional) | Additional intersecting features that the input features can be compared to when determining whether the feature is a small line. | Feature Layer |
recursive (Optional) | Specifies whether small lines on the line features will be removed.
| Boolean |
split_input_lines (Optional) | Specifies whether the input line features will be split at all intersections before determining the small lines to remove.
| Boolean |
Derived Output
Name | Explanation | Data Type |
output_features | Features where small lines have been removed based on input criteria. | Feature Layer |
Code sample
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 Modulesimport arcpy# Check Out Extensionsarcpy.CheckOutExtension('Foundation')# Set workspacearcpy.env.workspace = r'C:\data\LocalGovernment.gdb'# Setting Local Variablesin_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 Linesarcpy.management.MakeFeatureLayer(in_features,in_featuresLyr)arcpy.management.MakeFeatureLayer(in_intersecting_features, in_intersecting_featuresLyr)# Execute Remove Small Linesarcpy.topographic.RemoveSmallLines(in_featuresLyr,minimum_length,maximum_angle,in_intersecting_featuresLyr,recursive)# Check In Extensionsarcpy.CheckInExtension('Foundation')
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: No
- Standard: Requires Production Mapping
- Advanced: Requires Production Mapping
Related topics
- An overview of the Generalization toolset
- Find a geoprocessing tool
Feedback on this topic?
In this topic
- Summary
- Illustration
- Usage
- Parameters
- Environments
- Licensing information
FAQs
How do I delete contour lines in Arcgis? ›
To delete a contour, select the one to remove with the cursor and press the Delete key on your keyboard. To select multiple contours to delete, hold down the Shift or Ctrl keys and click them. Once the contours are selected, you can also right-click and select Delete.
How do I delete a line in Arcgis pro? ›- On the Edit tab, in the Features group, click Select. and select the feature you want to delete.
- Delete the selected feature using one of the following methods: On the Edit tab, in the Features group, click Delete. . Right-click and click Delete. . Press the Delete key.
To remove legend items, expand the legend in the Contents pane to see the items. Right-click an item and click Remove. Uncheck a legend item to turn off its visibility without removing it from the legend.