Closed cornelmpop closed 11 months ago
The following input should produce one TRUE value, but the output is FALSE, FALSE:
seg <- data.frame(x = c(-7.249440, -7.282816), y = c(0.5743027, 0.9284002), z = c(502.5920, 502.8661)) coords <- data.frame(x = c(-7.259582, -7.455739), y = c(0.6819025, 2.7629832), z = c(502.6753, 504.2863)) coords_onseg(coords, seg, tol = 0.01) # FALSE FALSE
dist_pt2l(coords, seg) # Not perfect, but clearly within a reasonable threshold of the line
lines3d(seg, col = "red") points3d(coords, col = "blue")
There were two issues that were affecting unreleased code in version 0.5.1:
Both issues have been fixed and a test has been added to prevent future recurrence.
The following input should produce one TRUE value, but the output is FALSE, FALSE:
seg <- data.frame(x = c(-7.249440, -7.282816), y = c(0.5743027, 0.9284002), z = c(502.5920, 502.8661)) coords <- data.frame(x = c(-7.259582, -7.455739), y = c(0.6819025, 2.7629832), z = c(502.6753, 504.2863)) coords_onseg(coords, seg, tol = 0.01) # FALSE FALSE
dist_pt2l(coords, seg) # Not perfect, but clearly within a reasonable threshold of the line
Plot to visualize - one point is clearly on the segment:
lines3d(seg, col = "red") points3d(coords, col = "blue")