Deleting short line segments

179
4
01-19-2021 11:49 AM
Sunny
by
New Contributor II

Hello,

As you can see from the below image, I want to delete short segment lines (roads marked in red) that are away from the main cluster.

1. Is there any way to detect lines (red in the image below) that are shorter than input distance (50' for example) and delete them?

2.  If the above option works, then how can I separate the short isolated lines (red in the below image) and the short lines that are connected to each other(blue in the below image). I only want to delete red and keep blue.3.png

Thank you,

0 Kudos
4 Replies
DavidPike
MVP Regular Contributor

Well in the first instance you should have a filed called SHAPE_LENGTH which is the length of each segment, a select by attributes Select Layer By Attribute (Data Management)—ArcGIS Pro | Documentation where for example SHAPE_LENGTH < 10.0

Be sure that you have correctly projected your data though, as if it's in a GCS such as WGS84 (or even a questionable projection such as Web Mercator), the SHAPE_LENGTH value will be either in decimal degrees or slightly/very incorrect.

 

The other issue - let me think, it seems tricky.

Sunny
by
New Contributor II

Thanks!

Yea, I need to somehow make a condition to distinguish the line that have less intersection points

0 Kudos
DavidPike
MVP Regular Contributor

Ok had a think, you can dissolve Dissolve (Data Management)—ArcGIS Pro | Documentation using the default 'UNSPLIT_LINES' parameter. This will turn all touching segments into a single feature.  You can then again use the SHAPE_LENGTH to select these small lines, but this time, ones which are part of the 'main' segments will have a large value instead.

If you wish to keep the original unmerged line features, I would still do the same process to select all of your unwanted lines, but instead of then deleting them, export them to a new feature class, then use that exported feature class to select by location (i.e. intersecting the original lines, and then delete).

DanPatterson
MVP Notable Contributor

Add Geometry Attributes (Data Management)—ArcGIS Pro | Documentation

If you want 2 point lines, add the point count option and length option, then query for it.

So with the above tool, you determine the number of vertices that you want and their length.

If you want to differentiate between those that are connected to other features, then that can also be accomplished using select by location options for example.

Select By Location: Select based on spatial relationship within the layer—ArcGIS Pro | Documentation

So if you can come up with the rules to isolate what you want to identify, then it can be accomplished


... sort of retired...