Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
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
Showing
with
36 additions
and 26 deletions.