Skip to content

Commit

Permalink
fetchSOLUS: check for SpatVector before checking point geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Oct 23, 2024
1 parent d2a5578 commit 261c27f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/fetchSOLUS.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fetchSOLUS <- function(x = NULL,
stop("Cannot interpolate for SoilProfileCollection output with only one depth slice! Change `method` to \"step\" or add another `depth_slice`.", call. = FALSE)
}

if (!missing(x) && !is.null(x) && terra::is.points(x)) {
if (!missing(x) && !is.null(x) && inherits(x, 'SpatVector') && terra::is.points(x)) {
dat <- terra::extract(r, x)
} else {
if (!missing(samples) && !is.null(samples)) {
Expand Down

0 comments on commit 261c27f

Please sign in to comment.