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

Validate edge linestrings #1729

Open
visr opened this issue Aug 14, 2024 · 2 comments
Open

Validate edge linestrings #1729

visr opened this issue Aug 14, 2024 · 2 comments
Labels
validation Related to model validation

Comments

@visr
Copy link
Member

visr commented Aug 14, 2024

So far, the core doesn't do anything with geometries. But if the edge linestring does not start at the from_node_id node point to the to to_node_id node point, that can lead to some very confusing situations, that have already happened. So we should consider validating this.

We should do this in Python on edge.add as well, if a linestring is passed.

In the core, I don't want to start relying on GDAL, but perhaps we can use (parts of) https://github.com/JuliaGeo/GeoPackage.jl.

We can just require snapping, so exact or Float64 approx equality should suffice. Note that I'm talking only about validating the start and end of the linestrings. This should handle both single and multi segment linestrings. Intermediate vertices of linestrings don't need to be validated; although it wouldn't be nice if they lie on Node points.

@visr visr added the validation Related to model validation label Aug 14, 2024
@visr
Copy link
Member Author

visr commented Aug 15, 2024

Whilst we plan to do this, we should postpone this until the end of the year, and communicate with @rbruijnshkv because their network generation will have to be updated for this, they have gaps from waterways to node points in the edges.

@DanielTollenaar wrote a Python function to check this separately; could you link that code here?

@DanielTollenaar
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation Related to model validation
Projects
Status: To do
Development

No branches or pull requests

2 participants