powered by
nearestPointOnLine(coordsLine, coordsPoint)
nearestPointOnSegment
snapPointsToLines
coordsLine = cbind(c(1,2,3),c(3,2,2)) coordsPoint = c(1.2,1.5) nearestPointOnLine(coordsLine, coordsPoint)
Run the code above in your browser using DataLab