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

Refactor split_long_edges #39

Closed
barneydobson opened this issue Feb 6, 2024 · 2 comments
Closed

Refactor split_long_edges #39

barneydobson opened this issue Feb 6, 2024 · 2 comments
Labels
refactor Refactoring existing code without significantly changing functionality

Comments

@barneydobson
Copy link
Collaborator

The function is not pretty and inefficient.

Suggestions:

This will be much more efficient if done on the GeoDataFrame representation of the graph. First, use ox.utils_graph.graph_to_gdfs to convert to a gdf, then do the operations and once done, use ox.utils_graph.graph_from_gdfs to convert it to a graph. You can also use shapely.segmentize.

@barneydobson barneydobson added the refactor Refactoring existing code without significantly changing functionality label Feb 6, 2024
@barneydobson barneydobson mentioned this issue Feb 6, 2024
13 tasks
@barneydobson
Copy link
Collaborator Author

Additionally current implementation can create edges with the same id as nodes, which SWMM doesn't allow (fixed in #83 by calling assign_id again - but it isn't very satisfying).

@barneydobson
Copy link
Collaborator Author

Fixed with #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring existing code without significantly changing functionality
Projects
None yet
Development

No branches or pull requests

1 participant