Select to view content in your preferred language

Select lines on lines in same file

1767
6
04-20-2021 06:06 PM
Labels (2)
DanSeidensticker
Regular Contributor

I have a street centerline shape file where segments for bi-directional roadways are drawn as two stacked lines. The top segment for one direction of travel, the bottom segment for the opposite direction of travel.

I need to separate these stacked lines into two different shape files.  Anyone know how to select just the top set of lines so I can export them to a different file. I can just use switch selection to get the second set of lines then.

Unfortunately none of the table attributes represent the top versus bottom segment, or direction of travel.  The geometry of the top and bottom segments are the same.

I looked at commands such as Find Identical, but that still selects both the top and bottom at the same time.

Looking for a solution in ArcGIS Desktop 10.6.1 Advanced or ArcGIS Pro 2.6.2

 

Tags (3)
0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Add Geometry Attributes   add the Bearing.

Find Identical .... just use the geometry field and you should get the duplicate geometries with different Bearings.

From there, your rule set to determine which is on top and which is on the bottom.  A quick symbology style using arrow line style would help


... sort of retired...
DanSeidensticker
Regular Contributor

Thanks for your reply. I'm not quite following.  I added the Bearings field.  When you say use the geometry field in Find Identical I take it you mean the Shape field?  I did so and have the list of duplicates.  I can relate that result back to the line file and select all the duplicates, but how are you suggesting I limit the selection to only the lines on top of others using the bearing?  I added a screen cap of a small selection if that helps. These lines are all stacked. The lines in yellow show one example of two duplicate stacked lines.

Capture.GIF

0 Kudos
JoeBorgione
MVP Emeritus

I just have to ask; why do you model your directions as two different geometries and not as an attribute value?  

That should just about do it....
0 Kudos
DanSeidensticker
Regular Contributor

I very much agree. It's not they way I model things either, but this is coming from a State DOT model I did not develop.

JoeBorgione
MVP Emeritus

Engineers love to make things waaay more complex than the need to be...

That should just about do it....
DanSeidensticker
Regular Contributor

I ended up combining the From and To Nodes into a single field ordered low to high using str(min( !A!, !B!)) + "_" + str (max(!A!, !B!)).  Then added a Dup field to identify the duplicate records.

uniqueList = []
def isDuplicate(inValue):
if inValue in uniqueList:
return 1
else:
uniqueList.append(inValue)
return 0

Dup = isDuplicate(!A_B!!)

From that I could query and export the two sets of lines using Dup = 0 and Dup =1

DanSeidensticker_0-1619471412350.png

 

0 Kudos