Find the mid-point of lines
Arguments
- l
A spatial lines object
- tolerance
The tolerance used to break lines at verteces. See
lwgeom::st_linesubstring()
.
See also
Other lines:
angle_diff()
,
geo_toptail()
,
is_linepoint()
,
line2df()
,
line2points()
,
line_bearing()
,
line_breakup()
,
line_segment()
,
line_via()
,
mats2line()
,
n_vertices()
,
onewaygeo()
,
points2line()
,
toptail_buff()
Examples
l = routes_fast_sf[2:5, ]
plot(l$geometry, col = 2:5)
midpoints = line_midpoint(l)
#> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first
#> Warning: st_linesubstring does not follow a geodesic; you may want to use st_geod_segmentize first
plot(midpoints, add = TRUE)