Skip to content

Commit

Permalink
Merge pull request #79 from adamlilith/adam_smith
Browse files Browse the repository at this point in the history
Fix bug due to change in terra's SpatExtent
  • Loading branch information
rsbivand authored Sep 10, 2023
2 parents 0d0b7b6 + fb5e77b commit f2f8c51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/initGRASS.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ initGRASS <- function(gisBase = NULL, home, SG, gisDbase, addon_base, location,
} else if (inherits(SG, "SpatRaster")) {
if (!requireNamespace("terra", quietly=TRUE))
stop("The terra package is required for the SG argument")
bb <- getMethod("ext", "SpatRaster")(SG)@ptr$vector
bb <- getMethod("ext", "SpatRaster")(SG)
bb <- as.vector(bb)
bb <- matrix(bb, 2, 2, byrow=TRUE)
colnames(bb) <- c("min", "max")
cs <- getMethod("res", "SpatRaster")(SG)
Expand Down

0 comments on commit f2f8c51

Please sign in to comment.