# NOT RUN {
l <- routes_fast_sf[2:4, ]
lpoints <- line2points(l)
lpoints_sfc <- line2points(sf::st_geometry(l))
identical(lpoints, lpoints_sfc)
lpoints2 <- line2pointsn(l)
plot(sf::st_geometry(lpoints), pch = lpoints$id, cex = lpoints$id, col = "black")
plot(lpoints2$geometry, add = TRUE)
# in sp data forms (may be depreciated)
l <- routes_fast[2:4, ]
lpoints <- line2points(l)
lpoints2 <- line2pointsn(l)
plot(lpoints, pch = lpoints$id, cex = lpoints$id)
points(lpoints2)
# }
Run the code above in your browser using DataLab