From c2a908fdaedb6d4a2c1d8884c3dfacb6489050a0 Mon Sep 17 00:00:00 2001 From: Chris Reudenbach Date: Fri, 7 Jun 2024 12:32:01 +0200 Subject: [PATCH] minor bugfixes --- DESCRIPTION | 6 +++--- NEWS.md | 4 ++-- R/gdalControls.R | 4 ++-- R/grassControl.R | 6 +++--- R/initProj.R | 7 +++---- R/linkGDAL.R | 4 ++-- R/linkGRASS.R | 2 +- R/linkOTB.R | 2 +- R/linkSAGA.R | 6 +++--- R/otbControls.R | 4 ++-- docs/articles/link2GI1.html | 2 +- docs/articles/link2GI2.html | 2 +- docs/articles/link2GI3.html | 2 +- docs/articles/link2GI4.html | 2 +- docs/articles/link2GI5.html | 2 +- docs/articles/link2GI6.html | 2 +- docs/articles/link2GI7.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 6 +++--- docs/pkgdown.yml | 2 +- docs/reference/initProj.html | 2 +- docs/reference/linkGDAL.html | 2 +- docs/reference/linkGRASS.html | 2 +- docs/reference/linkSAGA.html | 4 ++-- docs/reference/paramGRASSw.html | 2 +- docs/reference/setenvGDAL.html | 2 +- docs/reference/setenvOTB.html | 2 +- inst/templates/advancedSpatial.brew | 6 ++++-- inst/templates/base.brew | 6 ++++-- inst/templates/baseSpatial.brew | 4 ++-- inst/templates/config-master-yml.brew | 14 ++++++++------ inst/templates/post-processing.brew | 10 ---------- inst/templates/pre-processing.brew | 11 +---------- inst/templates/processing.brew | 14 ++------------ inst/templates/script_control.brew | 2 +- man/initProj.Rd | 2 +- man/linkGDAL.Rd | 2 +- man/linkGRASS.Rd | 2 +- man/linkSAGA.Rd | 4 ++-- man/paramGRASSw.Rd | 2 +- man/setenvGDAL.Rd | 2 +- man/setenvOTB.Rd | 2 +- 42 files changed, 72 insertions(+), 96 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d071773..96174a0 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,14 @@ Package: link2GI Type: Package Title: Linking Geographic Information Systems, Remote Sensing and Other Command Line Tools -Version: 0.6-1 -Date: 2024-05-03 +Version: 0.6-2 +Date: 2024-06-07 Authors@R: c(person("Chris", "Reudenbach", email = "reudenbach@uni-marburg.de", role = c("cre", "aut")), person("Tim", "Appelhans", email = "tim.appelhans@gmail.com>", role = c("ctb")) ) Encoding: UTF-8 Maintainer: Chris Reudenbach -Description: Functions for straightforward use of open GIS and remote sensing command line interfaces in a reproducible project environment. +Description: Functions and tools for using open GIS and remote sensing command-line interfaces in a reproducible environment. URL: https://github.com/r-spatial/link2GI/, https://r-spatial.github.io/link2GI/ BugReports: https://github.com/r-spatial/link2GI/issues/ License: GPL (>= 3) | file LICENSE diff --git a/NEWS.md b/NEWS.md index 42fcd6f..9510c8c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -172,7 +172,7 @@ bugfixes: new feature: -* add manual build function for UNC pathes +* add manual build function for UNC paths bugfixes: @@ -244,7 +244,7 @@ new feature: * remove all global variables (re-opened #3) * homogenization of the link calls * wrap searchAPIOS functions with OS-agnostic findAPI functions -* add a more robust return of all pathes and environmental variables as lists +* add a more robust return of all paths and environmental variables as lists * add a quiet option to supress all! console outputs ( #4) bugfixes: diff --git a/R/gdalControls.R b/R/gdalControls.R index 1ca16f1..2d942ac 100644 --- a/R/gdalControls.R +++ b/R/gdalControls.R @@ -3,7 +3,7 @@ #'@description Initializes and set up access to the 'GDAL' command line interface #' #'@param bin_GDAL string contains the path to the 'GDAL' binaries -#'@return Adds 'GDAL' pathes to the environment and creates the variable global string variable \code{gdalCmd}, that contains the path to the 'GDAL' binaries. +#'@return Adds 'GDAL' paths to the environment and creates the variable global string variable \code{gdalCmd}, that contains the path to the 'GDAL' binaries. #'@keywords internal #' #'@examples @@ -15,7 +15,7 @@ #' root_GDAL = 'C:/OSGeo4W64') #'} setenvGDAL <- function(bin_GDAL = NULL) { - # (R) set pathes of gdal modules and binaries depending on OS + # (R) set paths of gdal modules and binaries depending on OS if (Sys.info()["sysname"] == "Windows") { if (!exists("GiEnv")) GiEnv <- new.env(parent = globalenv()) diff --git a/R/grassControl.R b/R/grassControl.R index 62c00a2..99637f1 100644 --- a/R/grassControl.R +++ b/R/grassControl.R @@ -30,7 +30,7 @@ paramGRASSx <- function(set_default_GRASS = NULL, MP = "/usr/bin", ver_select = ver_select <- FALSE if (Sys.info()["sysname"] == "Windows") return(cat("You are running Windows - Please choose a suitable searchLocation argument that MUST include a Windows drive letter and colon")) - # iF WE KNOW NOTHING ABOUT grass PATHES WE HAVE TO SEARCH + # iF WE KNOW NOTHING ABOUT grass PATHS WE HAVE TO SEARCH if (is.null(set_default_GRASS)) { # SEARCH FOR INSTALLATIONS params_GRASS <- findGRASS(searchLocation = MP) @@ -92,7 +92,7 @@ paramGRASSx <- function(set_default_GRASS = NULL, MP = "/usr/bin", ver_select = #'@param DL character search location default = \code{C:} #'@param ver_select boolean default is FALSE. If there is more than one 'SAGA GIS' installation and \code{ver_select} = TRUE the user can select interactively the preferred 'SAGA GIS' version #'@param set_default_GRASS default = NULL forces a full search for 'GRASS GIS' binaries. You may -#' alternatively provide a vector containing pathes and keywords. c('C:/OSGeo4W64','grass-7.0.5','osgeo4w') is valid for a typical osgeo4w installation. +#' alternatively provide a vector containing paths and keywords. c('C:/OSGeo4W64','grass-7.0.5','osgeo4w') is valid for a typical osgeo4w installation. #' #'@param quiet boolean switch for supressing console messages default is TRUE #'@keywords internal @@ -115,7 +115,7 @@ paramGRASSw <- function(set_default_GRASS = NULL, DL = "C:/", ver_select = FALSE ver_select <- FALSE if (Sys.info()["sysname"] == "Linux") return(cat("You are running Linux - please choose a suitable searchLocation argument")) - # (R) set pathes of 'GRASS' binaries depending on 'WINDOWS' + # (R) set paths of 'GRASS' binaries depending on 'WINDOWS' if (is.null(set_default_GRASS)) { if (DL == "default" || is.null(DL)) DL <- "C:/" diff --git a/R/initProj.R b/R/initProj.R index 8996d08..ebccb5f 100755 --- a/R/initProj.R +++ b/R/initProj.R @@ -115,7 +115,7 @@ createFolders <- function(root_folder, folders, create_folders = TRUE) { #' this variable to load/save data to avoid any hard coded links in the scripts except the top-level root folder which #' is defined once in the main control script located at src/main.R. #' -#' @return dirs, i.e. a list containing the project pathes. +#' @return dirs, i.e. a list containing the project paths. #' #' @name initProj #' @@ -182,11 +182,10 @@ initProj <- function(root_folder = ".", folders = NULL, init_git = NULL, init_re libs = libs, standard_setup = NULL) } # create R project and scripts - brew::brew(system.file(sprintf("templates/%s.brew", "rstudio_proj"), package = "link2GI"), file.path(root_folder, paste0(basename(root_folder), - ".Rproj"))) + brew::brew(system.file(sprintf("templates/%s.brew", "rstudio_proj"), package = "link2GI"), file.path(root_folder, paste0(basename(root_folder), ".Rproj"))) brew::brew(system.file(sprintf("templates/%s.brew", "script_control"), package = "link2GI"), file.path(dirs$src, "main-control.R")) brew::brew(system.file(sprintf("templates/%s.brew", "pre-processing"), package = "link2GI"), file.path(dirs$src, "pre-processing.R")) - brew::brew(system.file(sprintf("templates/%s.brew", "processing"), package = "link2GI"), file.path(dirs$src, "10-processing.R")) + brew::brew(system.file(sprintf("templates/%s.brew", "processing"), package = "link2GI"), file.path(dirs$src, "processing.R")) brew::brew(system.file(sprintf("templates/%s.brew", "post-processing"), package = "link2GI"), file.path(dirs$src, "post-processing.R")) brew::brew(system.file(sprintf("templates/%s.brew", "config-master-yml"), package = "link2GI"), file.path(dirs$config, "config-master.yml")) diff --git a/R/linkGDAL.R b/R/linkGDAL.R index fda77de..2b43ea6 100644 --- a/R/linkGDAL.R +++ b/R/linkGDAL.R @@ -14,7 +14,7 @@ if (!isGeneric("linkGDAL")) { #' #'@note You may also set the path manually. Using a 'OSGeo4W64' \url{https://trac.osgeo.org/osgeo4w/} installation it is typically \code{C:/OSGeo4W64/bin/} #'@author Chris Reudenbach -#'@return add gdal pathes to the environment and creates global variables path_GDAL +#'@return add gdal paths to the environment and creates global variables path_GDAL #'@details if called without any parameter \code{linkGDAL()} it performs a full search over the hard drive \code{C:}. If it finds one or more 'GDAL' binaries it will take the first hit. You have to set \code{ver_select = TRUE} for an interactive selection of the preferred version. #'@export linkGDAL #' @@ -89,7 +89,7 @@ linkGDAL <- function(bin_GDAL = NULL, searchLocation = NULL, ver_select = FALSE, gdal$py <- params_GDAL[[3]][ver] gdal$exist <- TRUE } - # (R) set pathes of GDAL binaries depending on OS WINDOWS } + # (R) set paths of GDAL binaries depending on OS WINDOWS } # else { # if (is.null(searchLocation)) searchLocation<-'C:/' # params_GDAL <- findGDAL(searchLocation = # searchLocation,quiet = quiet) #if ( params_GDAL != FALSE) if (nrow(params_GDAL$gdalInstallations) == 1) { # pathGDAL <- setenvGDAL(bin_GDAL =params_GDAL$gdalInstallations[[1]][1]) # if more than one valid installation diff --git a/R/linkGRASS.R b/R/linkGRASS.R index 5e4885c..6e09b71 100644 --- a/R/linkGRASS.R +++ b/R/linkGRASS.R @@ -42,7 +42,7 @@ if (!isGeneric("linkGRASS")) { #'@param epsg manual epsg override #'@param ver_select Boolean if TRUE you may choose interactively the binary version (if found more than one), by default FALSE #'@param quiet Boolean switch for suppressing console messages default is TRUE -#'@param returnPaths Boolean if set to FALSE the pathes of the selected version are written +#'@param returnPaths Boolean if set to FALSE the paths of the selected version are written #' to the PATH variable only, otherwise all paths and versions of the installed GRASS versions ae returned. #'@author Chris Reudenbach #'@export linkGRASS diff --git a/R/linkOTB.R b/R/linkOTB.R index 4cb16db..3a60707 100644 --- a/R/linkOTB.R +++ b/R/linkOTB.R @@ -80,7 +80,7 @@ linkOTB <- function(bin_OTB = NULL, root_OTB = NULL, type_OTB = NULL, searchLoca otbCmd <- params_OTB$otbCmd[[ver]] } } - #### (R) set pathes of OTB binaries depending on OS WINDOWS ### + #### (R) set paths of OTB binaries depending on OS WINDOWS ### } else { if (nrow(params_OTB) == 1) { pathOTB <- setenvOTB(bin_OTB = params_OTB$binDir[1], root_OTB = params_OTB$baseDir[2]) diff --git a/R/linkSAGA.R b/R/linkSAGA.R index a04e160..4815820 100644 --- a/R/linkSAGA.R +++ b/R/linkSAGA.R @@ -23,8 +23,8 @@ if ( !isGeneric("linkSAGA") ) { #' is \code{C:}, for Linux systems default is \code{/usr/bin}. #'@param ver_select boolean default is FALSE. If there is more than one 'SAGA GIS' installation and \code{ver_select} = TRUE the user can select interactively the preferred 'SAGA GIS' version #'@param quiet boolean switch for supressing console messages default is TRUE -#'@param returnPaths boolean if set to FALSE the pathes of the selected version are written -#' to the PATH variable only, otherwise all paths and versions of the installed SAGA versions ae returned.#'@details If called without any parameter \code{linkSAGA()} it performs a full search over \code{C:}. If it finds one or more 'SAGA GIS' binaries it will take the first hit. You have to set \code{ver_select = TRUE} for an interactive selection of the preferred version. Additionally the selected SAGA pathes are added to the environment and the global variables \code{sagaPath}, \code{sagaModPath} and \code{sagaCmd} will be created. +#'@param returnPaths boolean if set to FALSE the paths of the selected version are written +#' to the PATH variable only, otherwise all paths and versions of the installed SAGA versions ae returned.#'@details If called without any parameter \code{linkSAGA()} it performs a full search over \code{C:}. If it finds one or more 'SAGA GIS' binaries it will take the first hit. You have to set \code{ver_select = TRUE} for an interactive selection of the preferred version. Additionally the selected SAGA paths are added to the environment and the global variables \code{sagaPath}, \code{sagaModPath} and \code{sagaCmd} will be created. #'@export linkSAGA #' @@ -51,7 +51,7 @@ linkSAGA <- function(default_SAGA = NULL, ver_select=FALSE, quiet = TRUE, returnPaths = TRUE){ - # (R) set pathes of SAGA modules and binaries depending on OS + # (R) set paths of SAGA modules and binaries depending on OS exist <- FALSE if (ver_select =='T') ver_select <- TRUE if (ver_select == "F" && !is.numeric(ver_select)) ver_select <- FALSE diff --git a/R/otbControls.R b/R/otbControls.R index 185acde..b48d7cf 100644 --- a/R/otbControls.R +++ b/R/otbControls.R @@ -5,7 +5,7 @@ #'@param bin_OTB string contains the path to the 'OTB' binaries #'@param root_OTB string contains the full string to the root folder #' containing the 'OTB' installation' -#'@return Adds 'OTB' pathes to the environment and creates the variable global string variable \code{otbCmd}, that contains the path to the 'OTB' binaries. +#'@return Adds 'OTB' paths to the environment and creates the variable global string variable \code{otbCmd}, that contains the path to the 'OTB' binaries. #'@keywords internal #' #'@examples @@ -15,7 +15,7 @@ #' root_OTB = 'C:\\OSGeo4W64') #'} setenvOTB <- function(bin_OTB = NULL, root_OTB = NULL) { - # (R) set pathes of otb modules and binaries depending on OS + # (R) set paths of otb modules and binaries depending on OS if (Sys.info()["sysname"] == "Windows") { if (!exists("GiEnv")) GiEnv <- new.env(parent = globalenv()) diff --git a/docs/articles/link2GI1.html b/docs/articles/link2GI1.html index 533275f..4ca7e7f 100644 --- a/docs/articles/link2GI1.html +++ b/docs/articles/link2GI1.html @@ -100,7 +100,7 @@

Link GI to R

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI1.Rmd diff --git a/docs/articles/link2GI2.html b/docs/articles/link2GI2.html index 707f3cc..5f0a67a 100644 --- a/docs/articles/link2GI2.html +++ b/docs/articles/link2GI2.html @@ -100,7 +100,7 @@

link2GI Basic Examples

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI2.Rmd diff --git a/docs/articles/link2GI3.html b/docs/articles/link2GI3.html index 56ec1a3..8ca8a3e 100644 --- a/docs/articles/link2GI3.html +++ b/docs/articles/link2GI3.html @@ -100,7 +100,7 @@

linkGRASS real world data usecase

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI3.Rmd diff --git a/docs/articles/link2GI4.html b/docs/articles/link2GI4.html index 0ffbb5c..4cbca4c 100644 --- a/docs/articles/link2GI4.html +++ b/docs/articles/link2GI4.html @@ -100,7 +100,7 @@

OTB Wrapper

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI4.Rmd diff --git a/docs/articles/link2GI5.html b/docs/articles/link2GI5.html index b070655..0e1a735 100644 --- a/docs/articles/link2GI5.html +++ b/docs/articles/link2GI5.html @@ -100,7 +100,7 @@

Reproducible project structures

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI5.Rmd diff --git a/docs/articles/link2GI6.html b/docs/articles/link2GI6.html index bbcb60c..929761f 100644 --- a/docs/articles/link2GI6.html +++ b/docs/articles/link2GI6.html @@ -100,7 +100,7 @@

GEOSTAT 2018 Examples

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI6.Rmd diff --git a/docs/articles/link2GI7.html b/docs/articles/link2GI7.html index 9bf6e7c..58f23fb 100644 --- a/docs/articles/link2GI7.html +++ b/docs/articles/link2GI7.html @@ -101,7 +101,7 @@

Installation guide for link2GI related

Chris Reudenbach

-

2024-06-01

+

2024-06-07

Source: vignettes/link2GI7.Rmd diff --git a/docs/index.html b/docs/index.html index 2cb4de6..34b8de7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,7 +12,7 @@ - +