# nc = st_read(system.file("gpkg/nc.gpkg", package="sf"), "nc.gpkg", crs = 4267)
nc = st_read(system.file("shape/nc.shp", package="sf"), "nc", crs = 4267)
plot(st_union_cascaded(st_sfc(do.call(c, st_geometry(nc)))),col=0)
mls = st_multilinestring(list(matrix(c(0,0,0,1,1,1,0,0),,2,byrow=TRUE)))
x = st_polygonize(mls)
plot(nc, axes = TRUE)
plot(st_centroid(nc), add = TRUE, pch = 3)
m = st_merge(nc)
plot(st_convex_hull(nc))
plot(nc, border = grey(.5))
Run the code above in your browser using DataLab