powered by
Divide sf LINESTRING objects into regular segments
line_segment_sf(l, n_segments, segment_length = NA)
A spatial lines object
The number of segments to divide the line into
The approximate length of segments in the output (overides n_segments if set)
Other lines: angle_diff(), geo_toptail(), is_linepoint(), line2df(), line2points(), line_bearing(), line_breakup(), line_midpoint(), line_sample(), line_segment(), line_via(), mats2line(), n_sample_length(), n_vertices(), onewaygeo(), points2line(), toptail_buff(), toptailgs(), update_line_geometry()
angle_diff()
geo_toptail()
is_linepoint()
line2df()
line2points()
line_bearing()
line_breakup()
line_midpoint()
line_sample()
line_segment()
line_via()
mats2line()
n_sample_length()
n_vertices()
onewaygeo()
points2line()
toptail_buff()
toptailgs()
update_line_geometry()
# NOT RUN { l <- routes_fast_sf[2, ] l_seg2 <- line_segment_sf(l = l, n_segments = 2) plot(sf::st_geometry(l_seg2), col = 1:2, lwd = 5) # }
Run the code above in your browser using DataLab