-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
lib/Vlib: Return all intersection points from Vect_line_get_intersections #2358
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current implementation of function Vect_line_get_intersections() reports a single intersection even if lines cross multiple times (a buggy implementation introduced by me in 2008 with https://trac.osgeo.org/grass/changeset/34306) Added tests should cover most of line intersection cases. A fix for Vect_line_get_intersections2() still needs to be done.
Old implementation of Vect_line_get_intersections2 returns only one line crossing point. After this commit all intersections are returned.
…nge the outcome In the code was an early bailout if an intersection was found. This shortcut is still taken if only a check of intersection needs to be done.
metzm
approved these changes
May 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neteler
pushed a commit
that referenced
this pull request
May 20, 2022
…#2358) * Vlib: report all line intersections in Vect_line_get_intersections|2() Current implementation of function Vect_line_get_intersections() reports a single intersection even if lines cross multiple times (a buggy implementation introduced by me in 2008 with https://trac.osgeo.org/grass/changeset/34306) Added tests should cover most of line intersection cases. Also fixes bug #2344 (+ a test case) Contains an update to documentation (from PR #2359 by metzm; fixes #2345)
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Oct 26, 2022
…OSGeo#2358) * Vlib: report all line intersections in Vect_line_get_intersections|2() Current implementation of function Vect_line_get_intersections() reports a single intersection even if lines cross multiple times (a buggy implementation introduced by me in 2008 with https://trac.osgeo.org/grass/changeset/34306) Added tests should cover most of line intersection cases. Also fixes bug OSGeo#2344 (+ a test case) Contains an update to documentation (from PR OSGeo#2359 by metzm; fixes OSGeo#2345)
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
…OSGeo#2358) * Vlib: report all line intersections in Vect_line_get_intersections|2() Current implementation of function Vect_line_get_intersections() reports a single intersection even if lines cross multiple times (a buggy implementation introduced by me in 2008 with https://trac.osgeo.org/grass/changeset/34306) Added tests should cover most of line intersection cases. Also fixes bug OSGeo#2344 (+ a test case) Contains an update to documentation (from PR OSGeo#2359 by metzm; fixes OSGeo#2345)
neteler
changed the title
Vlib: Return all intersection points from Vect_line_get_intersections
lib/Vlib: Return all intersection points from Vect_line_get_intersections
Jun 6, 2023
neteler
pushed a commit
to nilason/grass
that referenced
this pull request
Nov 7, 2023
…OSGeo#2358) * Vlib: report all line intersections in Vect_line_get_intersections|2() Current implementation of function Vect_line_get_intersections() reports a single intersection even if lines cross multiple times (a buggy implementation introduced by me in 2008 with https://trac.osgeo.org/grass/changeset/34306) Added tests should cover most of line intersection cases. Also fixes bug OSGeo#2344 (+ a test case) Contains an update to documentation (from PR OSGeo#2359 by metzm; fixes OSGeo#2345)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial implementation (by me in 2008 https://trac.osgeo.org/grass/changeset/34306) of Vect_line_get_intersections and Vect_line_get_intersections2 returns just one of intersection points between two lines. This is wrong as per bug #2344 users do expect to get back all intersection points. This PR fixes both functions and adds tests to Vlib, v.profile.
Might be a candidate for a backport.