From 94dec47048b161954df504cb151f7b31e9ce9f68 Mon Sep 17 00:00:00 2001 From: "Adam B. Smith" Date: Wed, 2 Apr 2025 14:35:05 -0500 Subject: [PATCH 1/3] Changes how `levels` files are discovered --- R/fast.r | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/R/fast.r b/R/fast.r index 12780184..a1128d24 100644 --- a/R/fast.r +++ b/R/fast.r @@ -198,7 +198,7 @@ methods::setMethod( flags = c(.quiet(), "overwrite", "o") # overriding projection check! ) - if (!.exists(src)) stop("Raster not loaded. You may need to use an absolute (not relative) file path.") + if (!.exists(src)) stop("Raster not loaded. Check the file name. You may need to use an absolute (not relative) file path.") if (nLayers > 1L) src <- paste0(src, ".", seq_len(nLayers)) ### raster levels @@ -217,15 +217,16 @@ methods::setMethod( levelsFileExt <- .fileExt(x) levelsFileName <- substr(levelsFileName, 1L, nchar(x) - nchar(levelsFileExt)) - extensions <- c("rds", "RDS", "rdata", "RData", "rda", "RDa", "Rda", "Rdat", "rdat", "RDat", "csv", "CSV", "tab", "TAB") + # extensions <- c("rds", "RDS", "rdata", "RData", "rda", "RDa", "Rda", "Rdat", "rdat", "RDat", "csv", "CSV", "tab", "TAB") + extensions <- c("rds", "rdata", "rda", "rdat", "csv", "tab") levelsFileNames <- paste0(levelsFileName, extensions) fileExists <- file.exists(levelsFileNames) if (any(fileExists)) { - if (sum(fileExists) > 1L) warning("More than one `levels` file found. Only the first will be used.") - levelsFileName <- levelsFileNames[fileExists[1L]] - extension <- .fileExt(x) + # if (sum(fileExists) > 1L) warning("More than one `levels` file found. Only the first will be used.") + levelsFileName <- levelsFileNames[fileExists] + extension <- extensions[fileExists] if (tolower(extension) == "rds") { levels <- readRDS(levelsFileName) From 647fe3f4468cfd7a856821b598532b8ae12171ee Mon Sep 17 00:00:00 2001 From: "Adam B. Smith" Date: Wed, 2 Apr 2025 22:45:49 -0500 Subject: [PATCH 2/3] Remove dependency on **rpanel** --- DESCRIPTION | 7 +++---- NAMESPACE | 1 - NEWS.md | 3 +++ R/plot.r | 9 ++++----- R/plotRGB.r | 7 ++++--- inst/pkgdown.yml | 4 ++-- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 05ff98d1..5232921b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: fasterRaster Type: Package Title: Faster Raster and Spatial Vector Processing Using 'GRASS GIS' -Version: 8.4.0.6 -Date: 2025-03-26 +Version: 8.4.0.7 +Date: 2025-04-02 Authors@R: c( person( @@ -29,9 +29,8 @@ Imports: graphics, grDevices, methods, - omnibus (>= 1.2.11), + omnibus (>= 1.2.15), rgrass (>= 0.3-9), - rpanel, sf, shiny, terra (>= 1.7), diff --git a/NAMESPACE b/NAMESPACE index aeeabf57..13966d0c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -279,5 +279,4 @@ import(terra, except = shift) importFrom(data.table,":=") importFrom(data.table,as.data.table) importFrom(graphics,par) -importFrom(rpanel,rp.screenresolution) importFrom(terra,median) diff --git a/NEWS.md b/NEWS.md index de29b8d0..6631ccc8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# fasterRaster 8.4.0.7 (2025-04-02) +o Removed dependency on **rpanel** because its dependency on **tclk** did not work with **Docker** images. Replaced with version dependency on **omnibus**'s `screenRes()` function. + # fasterRaster 8.4.0.6 (2025-03-26) o `faster(debug = TRUE)` displays the **GRASS** command for each **GRASS** module called in a **fasterRaster** function. o `GVector[i]` works for cases with long `i`s. diff --git a/R/plot.r b/R/plot.r index badb21d9..9b70396c 100644 --- a/R/plot.r +++ b/R/plot.r @@ -18,8 +18,6 @@ #' #' @seealso [terra::plot()] #' -#' @importFrom rpanel rp.screenresolution -#' #' @example man/examples/ex_plot.r #' #' @aliases plot @@ -33,9 +31,10 @@ methods::setMethod( # simplify if (simplify & !is.3d(x)) { - screenRes <- rpanel::rp.screenresolution() - screenWidth <- screenRes$width - screenHeight <- screenRes$height + # screenRes <- rpanel::rp.screenresolution() + screenRes <- omnibus::screenRes() + screenWidth <- screenRes[["width"]] + screenHeight <- screenRes[["width"]] rows <- nrow(x) cols <- ncol(x) diff --git a/R/plotRGB.r b/R/plotRGB.r index 195100dc..8caafb93 100644 --- a/R/plotRGB.r +++ b/R/plotRGB.r @@ -33,9 +33,10 @@ methods::setMethod( # simplify if (simplify & !is.3d(x)) { - screenRes <- rpanel::rp.screenresolution() - screenWidth <- screenRes$width - screenHeight <- screenRes$height + # screenRes <- rpanel::rp.screenresolution() + screenRes <- omnibus::screenRes() + screenWidth <- screenRes[["width"]] + screenHeight <- screenRes[["width"]] rows <- nrow(x) cols <- ncol(x) diff --git a/inst/pkgdown.yml b/inst/pkgdown.yml index c564e16b..066c1c74 100644 --- a/inst/pkgdown.yml +++ b/inst/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 3.1.11 +pandoc: 3.6.2 pkgdown: 2.1.1 pkgdown_sha: ~ articles: @@ -10,7 +10,7 @@ articles: projects_mapsets: projects_mapsets.html regions: regions.html three_d_objects: three_d_objects.html -last_built: 2025-02-25T18:57Z +last_built: 2025-04-03T03:24Z urls: reference: https://github.com/adamlilith/fasterRaster/reference article: https://github.com/adamlilith/fasterRaster/articles From 6f5c755f6be4702f9437cd9b60c6e5d0ed9c37d7 Mon Sep 17 00:00:00 2001 From: "Adam B. Smith" Date: Fri, 25 Apr 2025 09:08:50 -0500 Subject: [PATCH 3/3] Remove dependency on **tclk** --- DESCRIPTION | 7 +++---- NAMESPACE | 1 - NEWS.md | 3 +++ R/plot.r | 9 ++++----- R/plotRGB.r | 7 ++++--- inst/pkgdown.yml | 4 ++-- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 05ff98d1..4ca22d3a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: fasterRaster Type: Package Title: Faster Raster and Spatial Vector Processing Using 'GRASS GIS' -Version: 8.4.0.6 -Date: 2025-03-26 +Version: 8.4.0.7 +Date: 2025-04-24 Authors@R: c( person( @@ -29,9 +29,8 @@ Imports: graphics, grDevices, methods, - omnibus (>= 1.2.11), + omnibus (>= 1.2.15), rgrass (>= 0.3-9), - rpanel, sf, shiny, terra (>= 1.7), diff --git a/NAMESPACE b/NAMESPACE index aeeabf57..13966d0c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -279,5 +279,4 @@ import(terra, except = shift) importFrom(data.table,":=") importFrom(data.table,as.data.table) importFrom(graphics,par) -importFrom(rpanel,rp.screenresolution) importFrom(terra,median) diff --git a/NEWS.md b/NEWS.md index de29b8d0..492a19cc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# fasterRaster 8.4.0.7 (2025-04-24) +o Removed dependency on **rpanel** because its dependency on **tclk** did not work with **Docker** images. Replaced with version dependency on **omnibus**'s `screenRes()` function. + # fasterRaster 8.4.0.6 (2025-03-26) o `faster(debug = TRUE)` displays the **GRASS** command for each **GRASS** module called in a **fasterRaster** function. o `GVector[i]` works for cases with long `i`s. diff --git a/R/plot.r b/R/plot.r index badb21d9..9b70396c 100644 --- a/R/plot.r +++ b/R/plot.r @@ -18,8 +18,6 @@ #' #' @seealso [terra::plot()] #' -#' @importFrom rpanel rp.screenresolution -#' #' @example man/examples/ex_plot.r #' #' @aliases plot @@ -33,9 +31,10 @@ methods::setMethod( # simplify if (simplify & !is.3d(x)) { - screenRes <- rpanel::rp.screenresolution() - screenWidth <- screenRes$width - screenHeight <- screenRes$height + # screenRes <- rpanel::rp.screenresolution() + screenRes <- omnibus::screenRes() + screenWidth <- screenRes[["width"]] + screenHeight <- screenRes[["width"]] rows <- nrow(x) cols <- ncol(x) diff --git a/R/plotRGB.r b/R/plotRGB.r index 195100dc..8caafb93 100644 --- a/R/plotRGB.r +++ b/R/plotRGB.r @@ -33,9 +33,10 @@ methods::setMethod( # simplify if (simplify & !is.3d(x)) { - screenRes <- rpanel::rp.screenresolution() - screenWidth <- screenRes$width - screenHeight <- screenRes$height + # screenRes <- rpanel::rp.screenresolution() + screenRes <- omnibus::screenRes() + screenWidth <- screenRes[["width"]] + screenHeight <- screenRes[["width"]] rows <- nrow(x) cols <- ncol(x) diff --git a/inst/pkgdown.yml b/inst/pkgdown.yml index c564e16b..9503be36 100644 --- a/inst/pkgdown.yml +++ b/inst/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 3.1.11 +pandoc: 3.6.2 pkgdown: 2.1.1 pkgdown_sha: ~ articles: @@ -10,7 +10,7 @@ articles: projects_mapsets: projects_mapsets.html regions: regions.html three_d_objects: three_d_objects.html -last_built: 2025-02-25T18:57Z +last_built: 2025-04-25T13:52Z urls: reference: https://github.com/adamlilith/fasterRaster/reference article: https://github.com/adamlilith/fasterRaster/articles