View source: R/extendr-wrappers.R
locate_point_on_line | R Documentation |
Calculates the fraction of a LineString's length to a point
that is closes to a corresponding point in y
.
locate_point_on_line(x, y)
x |
an object of class |
y |
an object of class |
A numeric vector containing the fraction of of the LineString that would need to be traveled to reach the closest point.
x <- geom_linestring(c(-1, 0, 0), c(0, 0, 1))
y <- geom_point(-0.5, 0)
locate_point_on_line(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.