An error occurred while loading the file. Please try again.
-
Grelot Frederic authored
- st_write avec append = FALSE pour les MAJ Refs #6
2df8c0d7
# Functions
# Data
library(geau)
library(sf)
waterbody = sf::st_read(geau::current_version("data-common/data/topage/plan_eau", "shp"))
waterbody = sf::st_transform(waterbody, crs = st_crs(geau::so_ii_limit))
waterbody = waterbody[
lengths(sf::st_intersects(waterbody, geau::so_ii_limit)) > 0,
c("CdOH", "TopoOH")
]
names(waterbody) = c("id", "name", "geometry")
waterbody = sf::st_intersection(waterbody, geau::so_ii_limit)
# Save
sf::st_write(waterbody, "data-common/so-ii/topage/2021-09/plan_eau.shp", append = FALSE)