closest_point {rsgeo} | R Documentation |
Find Closest Point
Description
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.
Usage
closest_point(x, y)
closest_point_haversine(x, y)
Arguments
x |
an object of class |
y |
an object of class |
Value
An rs_POINT
vector
Examples
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)
[Package rsgeo version 0.1.6 Index]