R/as.SpatRasterDataset.R

Defines functions as.SpatRasterDataset

Documented in as.SpatRasterDataset

#' as.SpatRasterDataset
#'
#' Convert magclass object to a SpatRasterDataset object. Requires the terra package.
#'
#' Calls \code{\link{as.SpatRaster}} and then \code{\link{spatRasterToDataset}}.
#'
#' @param ... arguments passed to as.SpatRaster
#' @return A SpatRasterDataset object
#' @author Pascal Sauer
#' @export
as.SpatRasterDataset <- function(...) { # nolint: object_name_linter.
  return(spatRasterToDataset(as.SpatRaster(...)))
}

Try the magclass package in your browser

Any scripts or data that you put into this service are public.

magclass documentation built on May 29, 2024, 6:20 a.m.