Replies: 1 comment 1 reply
-
Hi @jahjones and thanks for your Q. I'll try to check your problem as soon as possible (hopefully next week). Meanwhile, I think you may want to read the solution here for inspiration: https://stackoverflow.com/questions/65958776/group-id-for-all-edges-between-points-using-sfnetwork-in-r Moreover, what do you mean by "it doesn't work for larger networks"? Does it take too much time? Are you running out of RAM? Something else? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I cannot fathom how to derive strahler order in R for large networks. Here's an example in postgres and neo4j. I have a solution that works for small networks.
There are three rules (from the GRASS 7.8 Manual):
if the node has no children, it's Strahler order is 1.
if the node has one and only one tributary with Strahler greatest order i, and all other tributaries have order less than i, then the order remains i.
if the node has two or more tributaries with greatest order i, then the Strahler order of the node is i + 1.
Here's what I would expect
Here's a solution that relies on phytools::strahlerNumber which I had to modify. But it doesn't work for larger networks.
e.g. a network with 28 nodes runs in seconds and a network with 1,467 nodes causes R to abort.
Beta Was this translation helpful? Give feedback.
All reactions