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

Try splitting 'y' at intersections in 'x' #2

Open
robinlovelace-ate opened this issue Apr 24, 2024 · 1 comment
Open

Try splitting 'y' at intersections in 'x' #2

robinlovelace-ate opened this issue Apr 24, 2024 · 1 comment

Comments

@robinlovelace-ate
Copy link
Contributor

The demo demonstrates the joining approach, with the best implementation so far being the rnet_join() function from the stplanr R package, in which users can set thresholds for the distance to join, how small segments in y are chopped (segment_length = 10 in example) and the angle tolerance (not yet demonstrated at present).

However, as outlined here, there is a potentially more efficient way of dividing y to prevent long segments missing short segments of x:

An alternative approach, not yet implemented, would be to split y not at regular intervals but at intersections with x, which would be more accurate but more computationally intensive.

This is different from the rnet_match algorithm described here:

- See description of the algorithm implemented in Rust here: <https://github.com/nptscot/rnetmatch/blob/main/rust/README.md>

We have a clearly defined next step on this: test out the [qgis:splitwithlines algorithm](https://docs.qgis.org/3.34/en/docs/user_manual/processing_algs/qgis/vectoroverlay.html#split-with-lines].
Before I do and out of interest, thoughts on Rust implementation?

I think the approach suggested above depends on flat headed buffers though, unless you draw perpendicular lines of length dist at each linestring start/end point in y, if that makes sense?

This is a nice to have. You get good results with the current implementation and can improve them further by reducing segment_length, just posting here for thoughts, cc also @cmconlan.

@robinlovelace-ate
Copy link
Contributor Author

FYI @dabreegster was meant to tag you in this one.

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

1 participant