I have two line layers in a gas distribution gdb and I want to select all of the class 6 lines that are connected to a class 5 main line, class 2 lines are connected to a main line that is NOT class 2, etc. Specifically, it is the 'connected to' aspect of this that I cannot figure out.
I believe the easiest way to approach this would be to create a dictionary with keys of all the points which represent connections between pipes, and a value that is a list of all the pipe classes which connect at that point. Then for each line, check the points that touch the line for the class value matching your criteria for that selection.
It would be helpful if you could provide some more information, maybe even a sample dataset. It is the "etc." part that makes me hesitate because what I suggest will likely vary if there are 3 conditions or 30 conditions.
Thanks for taking a look at my question, Joshua. The different pressure classification levels are 1, 2, 5, 6, 7, and 8. These are the same classes in both the service line layer and the main line layer. I essentially need to find all the service lines that don't match the main lines regarding pressure classification. I'll try to gather some samples later this afternoon.