line_midpoint {stplanr} | R Documentation |
Find the mid-point of lines
Description
Find the mid-point of lines
Usage
line_midpoint(l, tolerance = NULL)
Arguments
l |
A spatial lines object |
tolerance |
The tolerance used to break lines at verteces.
See |
See Also
Other lines:
angle_diff()
,
geo_toptail()
,
is_linepoint()
,
line2df()
,
line2points()
,
line_bearing()
,
line_breakup()
,
line_segment()
,
line_segment1()
,
line_via()
,
mats2line()
,
n_segments()
,
n_vertices()
,
onewaygeo()
,
points2line()
,
toptail_buff()
Examples
l <- routes_fast_sf[2:5, ]
plot(l$geometry, col = 2:5)
midpoints <- line_midpoint(l)
plot(midpoints, add = TRUE)
# compare with sf::st_point_on_surface:
midpoints2 <- sf::st_point_on_surface(l)
plot(midpoints2, add = TRUE, col = "red")
[Package stplanr version 1.2.1 Index]