-
Notifications
You must be signed in to change notification settings - Fork 2
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
Using the package to generate an UDN #381
Comments
Hi @AnuPal1Hydro123 , thanks for the question. I would suggest starting with running with Also, if you don't want to run the model in SWMM, you will soon be able to switch this behaviour off by setting |
Regarding the similarity to road network, this is by design, see the paper for more details. Regarding the density of nodes, this is parameterised behaviour that can be edited. If you want less dense nodes then you will want to do things such as add the following to your parmameter_overrides:
subcatchment_derivation:
max_street_length: 80
node_merge_distance: 20 See this part of the extended demo for more details. And regarding crossing the boundary polygon, this will need clipping to a custom area. This will be behaviour I will add to the full package in due course, but for now you can use the following graph function: import networkx as nx
from swmmanywhere.graph_utilities import BaseGraphFunction, register_graphfcn
from swmmanywhere.metric_utilities import nodes_to_subs
@register_graphfcn
class trim_to_real(BaseGraphFunction):
"""Trim to real outline."""
def __init__(self):
"""Initialise the class."""
super().__init__()
self.required_node_attributes = ["x", "y"]
def __call__(self, G: nx.Graph, **kwargs) -> nx.Graph:
"""Call the graph function."""
outline = gpd.read_file(</path/to/outline.geojson>)
nodes_joined = nodes_to_subs(G, outline)
G = G.subgraph(nodes_joined.id).copy()
return G You will need to follow the instructions on adding a custom graphfcn |
Hi
I want to use this package to generate an Urban Drainage network shapefile for Houston City, Texas and want to compare it with the real drainage network and Manholes. I do not wish to use SWMM model and will probably go with other models. Any advice on how to do this? Thank you
The text was updated successfully, but these errors were encountered: