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

Smooth the simplified flowline. #50

Open
donghuix opened this issue Oct 7, 2022 · 2 comments
Open

Smooth the simplified flowline. #50

donghuix opened this issue Oct 7, 2022 · 2 comments

Comments

@donghuix
Copy link

donghuix commented Oct 7, 2022

Currently, the simulated flowline has different distance between two adjacent vertices. The distance can be very long over some parts of the flowline, which will result in abrupt change for the channel elevation when deriving the channel slope. It will be useful to add a feature to smooth the simulated flowline, and the user can provide an threshold to determine the minimum distance between any two adjacent vertices.

@changliao1025
Copy link
Owner

To support this feature, we will add a new algorithm to automatically break an edge into multiple edge if its length exceeds the user provided threshold.
The algorithm will split the edge by two recursively until each sub edge is shorter than the threshold.
The algorithm will be implemented following some discussion from here:

https://gis.stackexchange.com/questions/55166/how-to-calculate-midpoint-given-north-south-latitude-and-east-west-longitude

The algorithm works on a sphere.

@changliao1025
Copy link
Owner

Screen Shot 2022-10-10 at 10 51 12 AM

Screen Shot 2022-10-10 at 10 51 54 AM

Pyflowline now has an experiment algorithm to support this feature. The model will scan the simplified flowline and identify the edges (defined by a starting and ending point) that exceed the length threshold. It splits the edge by the middle point one or more times depending on the final length. Other components may also use vector-based algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants