Closed dblodgett-usgs closed 1 year ago
Turns out this is a case where there is no good way to choose which upstream line should be "main". For now, I'm going to use the smaller name attribute, which will fix this acute issue as the primary name attribute is smaller than the secondary. I will also log out all the cases where this is happening so we can check them. This should be exceedingly rare.
The code will now use the count of features in the network with a given name to decide which to use as the "main" upstream flowline.
It works as expected now.
A system of diversions as shown is resulting in the divergence being flagged as primary.
The only thing I can think is that this is related to the fact that the incoming main path is itself downstream of a diversion.