I am using Model Builder and I have two layers; point and line. I want to select (and then create a point layer of them) those points that have less connections with other points.
For instant, point # 6 is connected to 5 points (# 11, 16, 20, 47, & 19) through 5 lines. Among these five points, # 47 is the one I want to find it since it has only 2 connections with others (# 6 & # 54), the rest have more lines connected to (#19 connected to 3 lines, # 11 connected to 4 lines, #16 connected to 3 lines, #20 connected to 3 lines).
Note that I already calculated (created a field) the number of lines connected to each point using spatial join.
Any way to use in ModelBuilder?
add the XY coordinates to the polyline shapefile using the first and last point option
Then you can try summarizing by one of the coordinates or a pair. Given your current pattern where there is unlikely to be no duplicate X or Y values, unless they are the start or end, this should simplify things.
One tip might be to one step further....
There are other ways... for example, relates (using rounded truncated coordinates as text etc). or exporting the point coordinates and doing a lexicographic sort (by x, then Y) and then do a rolling difference to count the spacing between difference indices (requires numpy)
Thank you Chris and yes, I have calculated the lines connected to each point using spatial join but the problem is how can I select among these points the one with less connections.
That works perfectly. Can we generalize it to ask and select the one with minimum connections? in this example, I just say Join_Count=2. How can we select in general to say:
Join_Count= minimum one (2 in this case)?
I was just doing the same thing and ran into the same issue. The Select will work with a hard-coded value (like 1), but doesn't seem to accept Value or its various permutations (like %Value%). Odd.
Chris Donohue, GISP