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

Allowed geometry types #1730

Closed
visr opened this issue Aug 14, 2024 · 0 comments · Fixed by #1760
Closed

Allowed geometry types #1730

visr opened this issue Aug 14, 2024 · 0 comments · Fixed by #1760
Labels
python Relates to one of the Ribasim python packages QGIS Ribasim QGIS plugin v1.0 Release! validation Related to model validation

Comments

@visr
Copy link
Member

visr commented Aug 14, 2024

These types are properly in the docs and in Python as far as I can see. In the core we don't check them but we'll have to check them as part of #1729.

  • Node: Point
  • Edge: LineString or MultiLineString -> change to support only LineString
  • Basin / area: Polygon or MultiPolygon -> change to support only MultiPolygon

One can wonder if we should support MultiLineString or not. We added it because one may want to model two routes (waterways) from A to B as one combined edge. And if you want your geometries to follow the waterways, you may then want to use a MultiLineString to show that this edge is either this or that connection. Though this is quite an esoteric situation that nobody really needs, so best to simplify this to LineString only.

Another thing we should check: We currently use GeoSeries[Any] from pandera. Can we tighten this to replace Any with the actual allowed geometry types?

In the QGIS plugin we currently pick one allowed geometry type per Basin. If we remove MultiLineString support, perhaps we should remove Polygon support for "Basin / area" so we always know all geometry types. It's easy to convert Polygon to MultiPolygon if needed. I think "Basin / area" needs to be MultiPolygon since one may want to model e.g. two tertiary canals that don't touch as one Basin.

@visr visr added python Relates to one of the Ribasim python packages QGIS Ribasim QGIS plugin validation Related to model validation labels Aug 14, 2024
@github-project-automation github-project-automation bot moved this to To do in Ribasim Aug 14, 2024
@evetion evetion added the v1.0 Release! label Aug 22, 2024
@visr visr closed this as completed in 9c35260 Aug 27, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Ribasim Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Relates to one of the Ribasim python packages QGIS Ribasim QGIS plugin v1.0 Release! validation Related to model validation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants