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

Go back to globally unique node IDs? #1690

Closed
deltamarnix opened this issue Aug 2, 2024 · 2 comments · Fixed by #1717
Closed

Go back to globally unique node IDs? #1690

deltamarnix opened this issue Aug 2, 2024 · 2 comments · Fixed by #1717
Assignees
Labels
breaking A change that breaks existing models enhancement New feature or request

Comments

@deltamarnix
Copy link
Contributor

The edge table should only consist of (fid), name, from_node_id, to_node_id, edge_type, subnetwork_id.

But now it also contains from_node_type and to_node_type. This information is superfluous, because the information is already in the Node table.

We should get rid of it, because it makes changing the node type (e.g. from DiscreteControl to PidControl) hard in applications like QGIS. I want to go back to globally unique node ids.

That's the opposite of #1513

@deltamarnix deltamarnix added enhancement New feature or request breaking A change that breaks existing models labels Aug 2, 2024
@SouthEndMusic
Copy link
Collaborator

SouthEndMusic commented Aug 2, 2024

That information is needed because node IDs are not unique across different node types. So you need ID and type to uniquely specify a node

@visr
Copy link
Member

visr commented Aug 5, 2024

We didn't really document the reasoning why you now need both node ID and type (Basin #5) to uniquely specify a node.

The reason was to simplify the design and implementation of the Python API for adding nodes.

model.basin.add(Node(1, Point(0.0, 0.0)), basin_data)

The Node table for all Basins is in model.basin, not model. Only on writing out the model or calling model.node_table() is the whole Node table combined. So when adding a Basin we only need to check locally rather than keeping track of all IDs.

That doesn't mean we cannot change this though.

@visr visr changed the title Edge table in geopackage should not contain node type information Go back to globally unique node IDs? Aug 5, 2024
@evetion evetion self-assigned this Aug 13, 2024
evetion pushed a commit that referenced this issue Aug 27, 2024
An initial QGIS test plan for the plugin. There are still some tests to
be written.
I have also performed all these tests and created quite some new
reports.
There is also a known issues page for all of Ribasim, as we have some
things that simply don't work as expected.

New issues:

* #1678 
* #1679 
* #1681 
* #1682 
* #1683 
* #1684 
* #1685 
* #1688 
* #1689 
* #1690 

Fixes #320

---------

Co-authored-by: Martijn Visser <mgvisser@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A change that breaks existing models enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants