diff --git a/DESCRIPTION b/DESCRIPTION index f0e1433f..612255be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: raster Type: Package Title: Geographic Data Analysis and Modeling -Version: 3.6-23 -Date: 2023-07-03 +Version: 3.6-24 +Date: 2023-10-05 Imports: Rcpp, methods, terra (>= 1.7-29) LinkingTo: Rcpp Depends: sp (>= 1.4-5), R (>= 3.5.0) diff --git a/R/writeStartStopGDAL.R b/R/writeStartStopGDAL.R index 867bb905..daa82d62 100644 --- a/R/writeStartStopGDAL.R +++ b/R/writeStartStopGDAL.R @@ -64,8 +64,11 @@ writeStart(r, filename, overwrite=overwrite, gdal=gdal, filetype=format, datatype=datatype, progress=0, NAflag=NAflag, progressbar=FALSE, sources=sources) + if (inherits(x, "RasterStack")) { + x <- brick(x, values=FALSE) + } + attr(x@file, "transient") <- r - x@file@datanotation <- datatype x@file@driver <- 'gdal' x@data@fromdisk <- TRUE