if (FALSE) {
library(sf)
nc <- sf::st_read(system.file("shape/nc.shp", package="sf"))
## encode to polylines
enc <- encode(nc)
## convert encoded lines to well-known text
wkt <- polyline_wkt(enc)
}
Run the code above in your browser using DataLab