Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Jan 2, 2025
1 parent 15b067f commit 4b512d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 8 additions & 9 deletions R/merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ setMethod("merge", signature(x="SpatVector", y="SpatVector"),
}
)

setMethod("merge", signature(x="SpatRaster", y="SpatRaster"),
function(x, y, ..., first=TRUE, na.rm=TRUE, algo=1, filename="", overwrite=FALSE, wopt=list()) {
rc <- sprc(x, y, ...)
opt <- spatOptions(filename, overwrite, wopt=wopt)
x@pntr <- rc@pntr$merge(first[1], na.rm, algo, opt)
messages(x, "merge")
}
)


setMethod("merge", signature(x="SpatRasterCollection", "missing"),
function(x, first=TRUE, na.rm=TRUE, algo=1, method=NULL, filename="", ...) {
Expand All @@ -49,6 +40,14 @@ setMethod("merge", signature(x="SpatRasterCollection", "missing"),
}
)

setMethod("merge", signature(x="SpatRaster", y="SpatRaster"),
function(x, y, ..., first=TRUE, na.rm=TRUE, algo=1, method=NULL, filename="", overwrite=FALSE, wopt=list()) {
rc <- sprc(x, y, ...)
merge(rc, first=first, na.rm=na.rm, algo=algo, method=method, filename=filename, overwrite=overwrite, wopt=wopt)
}
)



setMethod("mosaic", signature(x="SpatRaster", y="SpatRaster"),
function(x, y, ..., fun="mean", filename="", overwrite=FALSE, wopt=list()) {
Expand Down
1 change: 1 addition & 0 deletions man/describe.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

\alias{describe}
\alias{describe,character-method}
\alias{describe,SpatRaster-method}

\title{describe}

Expand Down

0 comments on commit 4b512d4

Please sign in to comment.