NetworkValidator
NetworkValidator(model, tolerance=1)Contains some methods for validating a Ribasim-model
Parameters
model: Model Ribasim model tolerance: float (default=1) Tolerance to use for snapping. Should be in the units of the model.crs
Methods
| Name | Description |
|---|---|
| link_duplicated | Check if the from_node_id and to_node_id in the link-table is duplicated |
| link_incorrect_connectivity | Check if the geometries of the from_node_id and to_node_id are on the start and end vertices of the link-geometry within tolerance (default=1m) |
| link_incorrect_from_node | Check if the from_node_type in link-table in matches the node_type of the corresponding node in the node-table |
| link_incorrect_to_node | Check if the to_node_type in link-table in matches the node_type of the corresponding node in the node-table |
| link_incorrect_type_connectivity | Check links that contain wrong connectivity |
| link_missing_nodes | Check if the from_node_id and to_node_id in the link-table are both as node-id in the node-table |
| node_duplicated | Check if node_id is duplicated |
| node_internal_basin | Check if a Node with node_type Basin is not connected to another node |
| node_invalid_connectivity | Check if node_from and node_to are correct on link |
| node_overlapping | Check if the node-geometry overlaps another node within tolerance (default=1m) |
link_duplicated
NetworkValidator.link_duplicated()Check if the from_node_id and to_node_id in the link-table is duplicated
link_incorrect_connectivity
NetworkValidator.link_incorrect_connectivity()Check if the geometries of the from_node_id and to_node_id are on the start and end vertices of the link-geometry within tolerance (default=1m)
link_incorrect_from_node
NetworkValidator.link_incorrect_from_node()Check if the from_node_type in link-table in matches the node_type of the corresponding node in the node-table
link_incorrect_to_node
NetworkValidator.link_incorrect_to_node()Check if the to_node_type in link-table in matches the node_type of the corresponding node in the node-table
link_incorrect_type_connectivity
NetworkValidator.link_incorrect_type_connectivity(
from_node_type='ManningResistance',
to_node_type='LevelBoundary',
)Check links that contain wrong connectivity
link_missing_nodes
NetworkValidator.link_missing_nodes()Check if the from_node_id and to_node_id in the link-table are both as node-id in the node-table
node_duplicated
NetworkValidator.node_duplicated()Check if node_id is duplicated
node_internal_basin
NetworkValidator.node_internal_basin()Check if a Node with node_type Basin is not connected to another node
node_invalid_connectivity
NetworkValidator.node_invalid_connectivity(tolerance=1.0)Check if node_from and node_to are correct on link
node_overlapping
NetworkValidator.node_overlapping()Check if the node-geometry overlaps another node within tolerance (default=1m)