You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RivGraph identifies parallel links for its directionality finding, but it doesn't consider them as parallel links in the delta metrics (adjacency matrix). In the weighted (by width) adjacency matrix it currently gives the weight as the width of one of the links. This may or may not be a problem. An example on a very simple channel network is here.
A prior solution #10 used to introduce additional nodes, although this may not be totally necessary. It depends on the metrics being computed. To have this functionality, for RG object named delt with the initial network skeletonized (but not pruned) use the following (from @jonschwenk) order of operations.
delt.prune_network(path_shoreline=path_shrln, path_inletnodes=path_inlet)
delt.compute_link_width_and_length()
delt.assign_flow_directions()
delt.links, delt.nodes = lnu.add_artificial_nodes(delt.links, delt.nodes, delt.gdobj)
delt.compute_link_width_and_length() # Need to re-compute because we've split some links into 2 in order to add artificial nodes.
adj_w = delt.adjacency_matrix(weight='wid_adj') # Can also weight by 'len_adj' or provide a vector of your own weights.
The text was updated successfully, but these errors were encountered:
True, parallel edges are merged in the networkX representations. The solution here is to use lnu.add_artificial_nodes(), however it is currently not designed to respect flow directions when creating the artificial links. This change should be made, and docs updated to reflect it.
RivGraph identifies parallel links for its directionality finding, but it doesn't consider them as parallel links in the delta metrics (adjacency matrix). In the weighted (by width) adjacency matrix it currently gives the weight as the width of one of the links. This may or may not be a problem. An example on a very simple channel network is here.
A prior solution #10 used to introduce additional nodes, although this may not be totally necessary. It depends on the metrics being computed. To have this functionality, for RG object named
delt
with the initial network skeletonized (but not pruned) use the following (from @jonschwenk) order of operations.The text was updated successfully, but these errors were encountered: