
Last chance! 50% off unlimited learning
Sale ends in
Convert 2 matrices to lines
mats2line(mat1, mat2)
Matrix representing origins
Matrix representing destinations
Other lines: angle_diff
,
geo_toptail
, is_linepoint
,
line2df
, line_bearing
,
line_match
, line_midpoint
,
line_sample
, line_segment
,
line_via
, n_sample_length
,
n_vertices
, onewaygeo
,
onewayid
, points2line
,
toptail_buff
, toptailgs
,
update_line_geometry
# NOT RUN {
{
m1 <- matrix(c(1, 2, 1, 2), ncol = 2)
m2 <- matrix(c(9, 9, 9, 1), ncol = 2)
l <- mats2line(m1, m2)
class(l)
lsf <- sf::st_sf(l, crs = 4326)
class(lsf)
plot(lsf)
# mapview::mapview(lsf)
}
# }
Run the code above in your browser using DataLab