Commit 1f3af6ac authored by David Nortes Martínez's avatar David Nortes Martínez
Browse files

new theme 'chatchment'

Showing with 28 additions and 1 deletion
+28 -1
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
map_so_ii = function( map_so_ii = function(
dataset, dataset,
dataset_legend = NULL, dataset_legend = NULL,
theme = c("none", "clc", "catnat", "hydro", "population"), theme = c("none", "clc", "catnat", "hydro", "population", "catchment"),
bar = TRUE, bar = TRUE,
path = NULL, path = NULL,
legend_theme = FALSE, legend_theme = FALSE,
...@@ -196,6 +196,33 @@ map_so_ii = function( ...@@ -196,6 +196,33 @@ map_so_ii = function(
) )
} }
if ("catchment" %in% theme) {
if (missing(detail)) {
detail = "0"
}
detail = match.arg(
as.character(detail),
choices = c("0", "1", "2")
)
selection = geau::so_ii_catchment[["degre"]] == detail
geometry = geau::so_ii_catchment[["geometry"]][selection]
border = "grey80"
color = scales::alpha("grey80", .5)
lwd = 1
plot(geometry, border = border, col = color, lwd = lwd, add = TRUE)
theme_legend = list(
title = sprintf("Unit\u00e9 administrative"),
legend = "Bassin versant",
x = "topright",
cex = .8,
bg = "white",
inset = 0.01,
fill = unique(color),
border = border
)
}
if (!missing(dataset)) plot(dataset[["geometry"]], add = TRUE, ...) if (!missing(dataset)) plot(dataset[["geometry"]], add = TRUE, ...)
plot(geau::so_ii_limit, lwd = 2, add = TRUE) plot(geau::so_ii_limit, lwd = 2, add = TRUE)
......
Supports Markdown
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