Finds the point that lies a given fraction along a line.
Arguments
- x
an object of class
rs_LINESTRING
- fraction
a numeric vector of length 1 or the same length as
x
. Must be a value between 0 and 1 inclusive.
Examples
x <- geom_linestring(c(-1, 0, 0), c(0, 0, 1))
line_interpolate_point(x, 0.5)
#> <rs_POINT[1]>
#> [1] Point(Coord { x: 0.0, y: 0.0 }))