-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join edges/discard degree-two nodes #14
Comments
Suggest something like: Find set
Output path. TODO - is there prior art for this or similar (?), check for correctness (!) Would also be useful to inject a condition somewhere here - e.g. so as not to collapse edges with differing attributes. |
One function to find the connectivity degree:
And a function to actually merge edges:
|
Possible addition: if function returns ValueError: No objects to concatenate, it means there are no degree 2 nodes in the geodataframe. we may want to catch this error and just print the statement that the network is already 'clean' |
Recent issue with current implementation noted by @amanmajid - code assumes 'bridge' and 'infra_type' attributes. Note #33 here too - should be able to handle this generically. |
To create single edge where node offers no choice of route.
Consider how best to merge or concatenate data/metadata.
The text was updated successfully, but these errors were encountered: