| line_breakup | R Documentation |
This function breaks up a LINESTRING geometries into smaller pieces.
line_breakup(l, z)
l |
An sf object with LINESTRING geometry |
z |
An sf object with |
An sf object with LINESTRING geometry created after breaking up the input object.
Other lines:
angle_diff(),
geo_toptail(),
is_linepoint(),
line2df(),
line2points(),
line_bearing(),
line_midpoint(),
line_segment(),
line_segment1(),
line_via(),
mats2line(),
n_segments(),
n_vertices(),
onewaygeo(),
points2line(),
toptail_buff()
library(sf)
z <- zones_sf$geometry
l <- routes_fast_sf$geometry[2]
l_split <- line_breakup(l, z)
l
l_split
sf::st_length(l)
sum(sf::st_length(l_split))
plot(z)
plot(l, add = TRUE, lwd = 9, col = "grey")
plot(l_split, add = TRUE, col = 1:length(l_split))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.