library(sf)
if (FALSE) {
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"))
# extract
m <- mtq[c(5, 29, 9), ]
# Get borders
m_borders <- getBorders(x = m)
# Plot polygons
plot(st_geometry(m), border = NA, col = "grey60")
# Plot borders
plot(st_geometry(m_borders),
col = sample(x = rainbow(nrow(m_borders))),
lwd = 2 * c(4, 3, 2, 1), add = TRUE)
}
library(sf)
if (FALSE) {
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"))
# extract
m <- mtq[c(29, 9), ]
# Get borders
m_borders <- getOuterBorders(x = m)
# Plot polygons
plot(st_geometry(m))
# Plot borders
plot(st_geometry(m_borders),
col = sample(x = rainbow(nrow(m_borders))),
lwd = c(4, 1), add = TRUE)
}
Run the code above in your browser using DataLab