Finding intersections of more than two lines

809
4
Jump to solution
08-07-2021 09:49 AM
Labels (1)
Deborah_Priss
New Contributor II

Hi all,

I have been using ArcMap for some years for basic stuff and recently switched to ArcPro while trying to use arcpy at the same time. Therefore, I would appreciate any suggestions that I could use either in ArcPro as a tool or code in arcpy (if possible with explanations what exactly the code does).

Here's my question:

I have a shapefile of lines (road fragments) and I want to find points where at least 4 of those lines intersect. All I could find where ways to determine intersections of two features from the same shapefile or the intersections of features from several shapefiles. Is there a way to define the number of intersecting features from one shapefile?

To give you a bit of an impression of how my shapefile looks like, here a screenshot:

 

Screenshot 2021-08-07 174400.png

 

As you can see, there are some hubs (red) where a lot of lines intersect and those are exactly the points I want to find. Is there any way to that other than manually?

Many thanks in advance!

Deborah

0 Kudos
1 Solution

Accepted Solutions
Deborah_Priss
New Contributor II

Thanks again for your suggestiond. After trying a few things, I just went with intersecting the layer with itself and then using Aggregate Points to find locations with many intersections. I then filtered them, converted the feature class back to a point layer and repeated the progress to refine the results. I know, it's probably a bit complicated and not the straightforward way but it worked for now.

View solution in original post

0 Kudos
4 Replies
DavidPike
MVP Frequent Contributor

Maybe just an Intersect to itself, with a point output, then spatial join the output points back to the lines to get a JOIN_COUNT, then filter where it's >=4

DanPatterson
MVP Esteemed Contributor

given line inputs and point outputs, David's suggestion of intersect is one to pursue, 

How Intersect works—ArcGIS Pro | Documentation

however, be aware that it is moderately unlikely that the intersections points will exactly as you planned.

I would convert the shapefile to a featureclass in a file geodatabase so that you can have control over the tolerance aspects of the geometry.  If you don't you may end up with 4 or more lines that appear to intersect one location but in reality they are separated by some small but finite distance and you won't get your desired point count.  You may need to follow up with examining these clusters to achieve your end goal.


... sort of retired...
Deborah_Priss
New Contributor II

Thank you, @DavidPike and @DanPatterson! I think you're right and I have to include some tolerance. I'll play a bit with the intersection tool and see if I can work it out by adjusting the feature class geometry. I'll have to manually cross-check it with Google Earth afterwards anyway, but I thought it would spare me some time if I can partially automate that step and then just edit the points. This is just a small subset of my data and I'll have to apply the procedure to the whole dataset later.

0 Kudos
Deborah_Priss
New Contributor II

Thanks again for your suggestiond. After trying a few things, I just went with intersecting the layer with itself and then using Aggregate Points to find locations with many intersections. I then filtered them, converted the feature class back to a point layer and repeated the progress to refine the results. I know, it's probably a bit complicated and not the straightforward way but it worked for now.

0 Kudos