-
Notifications
You must be signed in to change notification settings - Fork 828
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
Add function to merge parallel roads #1161
Comments
Some relevant discussion #450 (comment). I also had a short email exchange with @gboeing at the time but it lead to no result apart from some explorations (available in https://github.com/martinfleis/network_simplification). |
Note that the |
In light of my prior comment and @martinfleis comment, I'm inclined to either:
As noted above, in prior conversation with @martinfleis, it is nontrivial to address this problem well (from both topological and geometric perspectives) and OSMnx may not be the right home (though I'm potentially open to it) for such functionality if a robust and generalizable algorithm is eventually developed. |
No one seemed enthused about option 2, so I guess I will go with option 1 for now and close this. |
Contributing guidelines
Documentation
Existing issues
What problem does your feature proposal solve?
OSMnx currently has two simplifications options:
simplify_graph
consolidate_intersections
I think there is a use case for a third one:
merge_parallel_edges
. It does exactly what it says: If you have multiple parallel edges – both starting and ending at the same node – it merges it to a single edge. This can be very useful for more mesoscopic models that don't need the extensive detail of for example multiple parallel highways.What is your proposed solution?
Introduce a
merge_parallel_edges
function to simplify MultiDiGraphs into DiGraphs by merging parallel edges.Some considerations:
What alternatives have you considered?
Manual pre-OSMnx manipulation of graph data to merge edges is inefficient and prone to errors. It also doesn't handle merging attributes cleanly.
Additional context
A basic API outline:
CC @anastassiavybornova, @martinfleis, @jdmcbr and @jGaboardi
The text was updated successfully, but these errors were encountered: