-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcs_upload - object raster - S4 objects not supported by gcs_upload #161
Comments
Hmm the issue here is that I assume the |
Thanks for your answer. Could you please specify what you mean when you comment on the function to handle S4 objects. The lines of code that I have commented have guided me from this issues: I have a loop that generates RasterLayer objects and I need to save them as "GTiff" format in a bucket |
If your loop writes to a temporary local file, uploads that filepath via |
Great thank so much. Your suggestion works. |
Usecase:
I am trying to save a raster object as a .tif file in gcs, with these lines of code:
f <- function(input, output){
raster::writeRaster(input, filename = output, format="GTiff", overwrite=TRUE)
}
gcs_upload(ndvi, name = "raster.tif", object_function = f, predefinedAcl = "bucketLevel")
Error:
Warning message in class(file) <- c("gcs_cf", class(file)):
“Setting class(x) to multiple strings ("gcs_cf", "RasterBrick", ...); result will no longer be an S4 object”.
The text was updated successfully, but these errors were encountered: