# NOT RUN {
library(sf)
mtq <- st_read(system.file("shape/martinique.shp", package="cartography"))
# Get units borders
mtq.outer <- getOuterBorders(x = mtq, res = 1000, width = 2500)
# Plot communesa
plot(st_geometry(mtq), col = "grey60")
# Plot borders
plot(st_geometry(mtq.outer), col = sample(x = rainbow(nrow(mtq.outer))),
lwd = 3, add = TRUE)
# }
# NOT RUN {
library(sp)
data(nuts2006)
# Get units borders
nuts0.outer <- getOuterBorders(x = nuts0.spdf)
# Plot Countries
plot(nuts0.spdf, border = NA, col = "grey60")
# Plot borders
plot(st_geometry(nuts0.outer), col = sample(x = rainbow(nrow(nuts0.outer))),
lwd = 3, add = TRUE)
# }
Run the code above in your browser using DataLab