View source: R/extendr-wrappers.R
closest_point | R Documentation |
For a given geometry, find the closest point on that geometry to a point. The closest point may be an intersection, a single point, or unable to be determined.
closest_point(x, y)
closest_point_haversine(x, y)
x |
an object of class |
y |
an object of class |
An rs_POINT
vector
x <- geom_linestring(1:100, runif(100, 0, 90), rep.int(1:10, 10))
y <- geom_point(runif(10, 0, 90), rnorm(10, 1, 90))
closest_point(x, y)
closest_point_haversine(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.