From 4ffefe5934c1497302897c26559b02e91f5edf5c Mon Sep 17 00:00:00 2001 From: Luuk van der Meer Date: Sun, 17 Nov 2024 19:00:16 +0100 Subject: [PATCH] cicd: Do not run st_network_iso example for now because of GEOS version :robot: --- R/iso.R | 18 +++++++++++------- vignettes/sfn05_routing.qmd | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/R/iso.R b/R/iso.R index 57c361ac..97f8ff02 100644 --- a/R/iso.R +++ b/R/iso.R @@ -56,17 +56,21 @@ #' oldpar = par(no.readonly = TRUE) #' par(mar = c(1,1,1,1)) #' -#' center = st_centroid(st_combine(st_geometry(roxel))) +#' # Note that this function requires GEOS >= 3.11! +#' if (compareVersion(sf_extSoftVersion()[["GEOS"]], "3.11.0") > -1) { #' -#' net = as_sfnetwork(roxel, directed = FALSE) +#' center = st_centroid(st_combine(st_geometry(roxel))) #' -#' iso = net |> -#' st_network_iso(node_is_nearest(center), c(1000, 500, 250), ratio = 0.3) +#' net = as_sfnetwork(roxel, directed = FALSE) #' -#' colors = c("#fee6ce90", "#fdae6b90", "#e6550d90") +#' iso = net |> +#' st_network_iso(node_is_nearest(center), c(1000, 500, 250), ratio = 0.3) #' -#' plot(net) -#' plot(st_geometry(iso), col = colors, add = TRUE) +#' colors = c("#fee6ce90", "#fdae6b90", "#e6550d90") +#' +#' plot(net) +#' plot(st_geometry(iso), col = colors, add = TRUE) +#' } #' #' par(oldpar) #' diff --git a/vignettes/sfn05_routing.qmd b/vignettes/sfn05_routing.qmd index 79a21f58..70f2b912 100644 --- a/vignettes/sfn05_routing.qmd +++ b/vignettes/sfn05_routing.qmd @@ -402,7 +402,7 @@ ggraph(net, "sf") + theme_void() ``` -### Isodistance polygons + ### Custom routing