Skip to content

Commit

Permalink
Update spClipRast.R
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrescino committed Jul 28, 2024
1 parent 1df15bc commit 22ff7bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/spClipRast.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ spClipRast <- function(rast,
if (fmt == "HFA") {
co <- paste0("COMPRESSION=", TRUE)
} else {
compresslst <- c("LZW", "PACKBITS", "DEFLATE")
compress <- pcheck.varchar(var2check=compress, varnm="compress",
checklst=compresslst, caption="Compress output?", gui=gui)
if (!is.null(compress)) {
co <- paste0("COMPRESS=", compress)
compressTypelst <- c("LZW", "PACKBITS", "DEFLATE")
compressType <- pcheck.varchar(var2check=compressType, varnm="compress",
checklst=compressTypelst, caption="Compress Type?", gui=gui)
if (!is.null(compressType)) {
co <- paste0("COMPRESS=", compressType)
}
}
}
Expand Down Expand Up @@ -299,7 +299,7 @@ spClipRast <- function(rast,

## Clip raster
clipRaster(src = clippolyvx,
srcfile = rastfn,
srcfile = normalizePath(rastfn),
src_band = bands,
dstfile = outfilenm,
fmt = fmt,
Expand Down

0 comments on commit 22ff7bb

Please sign in to comment.