-
Notifications
You must be signed in to change notification settings - Fork 4
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
tar_terra_rast
and terra objects won't work with cloud storage
#112
Comments
geotargets
and cloud storagetar_terra_rast
and terra objects won't work with cloud storage
This might not be something we can fix, but we should document it as a limitation and possibly open a discussion in the |
Is the rast() call made with the prefix '/vsicurl' or '/vsis3/'? If it isn't GDAL will whole-download the file behind the scenes, which sounds like what you're seeing (I don't understand how to run your example above, it fails for me and I don't understand how to unpack it) |
Sorry, this was a bit of a "note-to-self" left on a Friday. You'll need some credentials (which I could share privately) for that example to work. The I don't know if it's possible to customize this behavior, but you're right that in this particular case it would make sense to be able to use |
This might just be a bug in |
Opened discussion here: ropensci/targets#1367 |
Changing the read function for |
Before adding some kind of "force_memory" option, the workaround I'd like to try and document as a vignette is to use the relatively new content addressable storage functionality in |
I think there may be a problem with using cloud storage. When a SpatRaster is stored with
repository = "aws"
, for example, and a user tries to load it withtar_read()
ortar_load()
, I think what happens is the file is downloaded from AWS intotempdir()/_targets/scratch
, then read in using the read function stored informat
, then the file is deleted from the scratch dir once the target is loaded into memory. This means theSpatRaster
object makes it into memory, but the file it points to is gone.I've confirmed this behavior with a S3 bucket hosted on Jetstream2 and I can share (privately) the credentials for it if you'd like to test to confirm this.
I can't find an argument or option in
targets
that overrides this behavior, although I would have expectedmemory = "persistent"
to maybe do something here.The text was updated successfully, but these errors were encountered: