I am using an Rstudio Server Amazon Machine Image (AMI) from http://www.louisaslett.com/RStudio_AMI/获取href。我在Amazon S3存储桶中有许多大型(〜1.4GB)压缩TIFF图像(LZW压缩)。我已经安装了aws.s3和raster软件包。当我尝试通过使用get_object()将tiff之一移入AMI时,它将作为矢量而不是geotiff导入(请参见下文)。关于如何将其作为栅格移动的任何建议将不胜感激。
> temp<-aws.s3::get_object(object="l***2.tif", bucket = 'b***b', key = 'A***Q', secret = 'k***p')
> raster(temp)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘raster’ for signature ‘"raw"’
> is.vector(temp)
[1] TRUE
> length(temp)
[1] 1532610194
> temp[1:20]
[1] 49 49 2a 00 08 00 00 00 13 00 00 01 03 00 01 00 00 00 0d c3