pointOnSegment | R Documentation |
This function snaps a point to a segment based on the minimum distance between the point and the segment
pointOnSegment(s, p)
s |
[2,2] matrix giving the coordinates of the line, one point per row |
p |
2-length vector repsenting the point |
A 4-length vector, with 'x','y' [coordinates of the point snapped to the segment], 'd' [distance from the input point to the new snapped point], and 'chain' [distance from the starting of the segment to the snapped point]
Javier Garcia-Pintado
Spatial-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.