From aa5cb3320735c89cbe54d2e2f8a052ce33723f71 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Thu, 19 Oct 2023 12:00:13 -0700 Subject: [PATCH] Ensure quiet flag is passed through appropriately --- R/clip_erase.R | 5 +++++ R/utils.R | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/R/clip_erase.R b/R/clip_erase.R index 7581b3b..79c7d11 100755 --- a/R/clip_erase.R +++ b/R/clip_erase.R @@ -426,6 +426,11 @@ mapshaper_clip_erase <- function(target_layer, overlay_layer, bbox, type, if (isTRUE(gj2008)) { command <- paste(command, "gj2008") } + + if (isTRUE(quiet)) { + command <- paste(command, "-quiet") + } + # Create an object to hold the return value ms$eval("var return_data;") diff --git a/R/utils.R b/R/utils.R index 7d7f24d..3309f8b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -66,7 +66,12 @@ apply_mapshaper_commands <- function( out_flags <- paste("-o", add_id, gj2008) } - command <- c(command, out_flags) + command <- c( + command, + out_flags, + if (quiet) "-quiet" + ) + command <- paste(ms_compact(command), collapse = " ") ms <- ms_make_ctx()