Skip to content
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

Follow-ups on consolidate_intersections #548

Open
martinfleis opened this issue Feb 3, 2024 · 0 comments
Open

Follow-ups on consolidate_intersections #548

martinfleis opened this issue Feb 3, 2024 · 0 comments
Assignees

Comments

@martinfleis
Copy link
Member

The consolidate_intersections now works on OSMnx graphs but to make it work on a generic graph generated via ´gdf_to_nx`, it requires #546 and a specific setup:

graph = mm.gdf_to_nx(auckland, length="length", integer_labels=True)
nx.set_edge_attributes(graph, {edge: {"from": edge[0], "to": edge[1]} for edge in graph.edges})

The last bit is fairly redundant as it encodes the information about the edge nodes as attributes. No clue why osmnx does that in the first place but would rather avoid that in gdf_to_nx so we should probably do that on-the-fly in the function itself.

@martinfleis martinfleis added this to the 0.8.0 milestone Feb 3, 2024
@martinfleis martinfleis self-assigned this Feb 3, 2024
@martinfleis martinfleis removed this from the 0.8.0 milestone Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant