Commit 3832fc4f authored by Dorchies David's avatar Dorchies David
Browse files

feat(plot_seine_map): add cities in empty spaces

parent 83ea64de
Pipeline #31975 passed with stages
in 38 minutes and 52 seconds
......@@ -31,7 +31,7 @@ plot_seine_map <- function(r, breaks, title, credits = "IGN, Inrae", ...) {
# Add main cities
data(gis_villes)
mf_label(x = gis_villes, var = "X1",
cex = 0.5, halo = TRUE, r = 0.10)
cex = 0.55, halo = TRUE, r = 0.10)
# Add label for lakes
lac <- data.frame(x = c(780355.2, 760259.1, 749809.1, 719263.0),
......@@ -41,7 +41,7 @@ plot_seine_map <- function(r, breaks, title, credits = "IGN, Inrae", ...) {
sf_lac <- st_as_sf(lac, coords = c("x", "y"), crs = 27572)
mf_map(sf_lac, var = "zz", type = "symb", pal = "red", leg_pos = NA)
mf_label(x = sf_lac, var = "name", col = "navyblue",
cex = 0.65, halo = TRUE, r = 0.10, pos = 4)
cex = 0.7, halo = TRUE, r = 0.10, pos = 4)
legend(
"bottomleft",
......
#' Record GIS shape file of intermediate basin edges
# Local config
library(seinebasin2)
cfg <- loadConfig("bookdown/config.yml")
gis_bvi <- rgdal::readOGR(dsn = getDataPath(cfg$hydroclim$path, "GIS", "bvi_shape", cfg = cfg),
......
#' Record GIS shape file of river network
# Local config
library(seinebasin2)
cfg <- loadConfig("bookdown/config.yml")
# Read Shape file
gis_villes <- sf::st_read(dsn = getDataPath(cfg$hydroclim$path, "GIS", "Villes_principales", cfg = cfg),
layer = "Villes_principales")
# Selection of main rivers
# Delete extra columns
gis_villes <- gis_villes[, "X1"]
# Add extra towns
dfV <- data.frame(x = c(581488, 668501, 723528, 672043, 670359, 693041),
y = c(2492465, 2539327, 2474726, 2487744, 2356131, 2508093),
X1 = c("Beauvais", "Saint-Quentin", "Reims", "Soissons", "Sens", "Laon"))
gis_villes <- rbind(gis_villes,
sf::st_as_sf(dfV, coords = c("x", "y"),
crs = sf::st_crs(gis_villes)))
usethis::use_data(gis_villes, overwrite = TRUE)
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment