Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 6 additions & 5 deletions R/fast.r
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
9 changes: 4 additions & 5 deletions R/plot.r
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#'
#' @seealso [terra::plot()]
#'
#' @importFrom rpanel rp.screenresolution
#'
#' @example man/examples/ex_plot.r
#'
#' @aliases plot
Expand All @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions R/plotRGB.r
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions inst/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pandoc: 3.1.11
pandoc: 3.6.2
pkgdown: 2.1.1
pkgdown_sha: ~
articles:
Expand All @@ -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