DOI-USGS / hydroloom

hydrologic geospatial fabric creation tools. See official repository here: https://code.usgs.gov/water/hydroloom
https://doi-usgs.github.io/hydroloom/
Creative Commons Zero v1.0 Universal
25 stars 2 forks source link

Issue figuring out diversion with chained diversions. #10

Closed dblodgett-usgs closed 1 year ago

dblodgett-usgs commented 1 year ago

A system of diversions as shown is resulting in the divergence being flagged as primary.

image

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.

dblodgett-usgs commented 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.

dblodgett-usgs commented 1 year ago

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.

image