Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Handle exact distances in curveSubstring
Fixes #41081 These exact distances may be obtained with distance_to_vertex. Before this change, the code considered the line segments as open intervals, so that vertices could not ever be considered as the start of a substring. This change considers them as semi-open intervals (closed at the beginning) instead. (With a special case when starting the substring at the last vertex) Before this change, vertices could not be considered as the end of a substring, so an other loop was required, adding a duplicate node. Similar behaviour is observed for QgsCircularString and corrected similarly. Double equality is performed as exact equality, because it does not matter on which segment the start of the substring is. Except where startDistance is -0.0, which is already handled before the for loop, or when startDistance is at the last vertex. (cherry picked from commit 5b2685d)
- Loading branch information
1 parent
6c5b035
commit 2bf2246
Showing
3 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
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
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
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