r - 未保存在 GCS 容器/存储桶中的文件
问题描述
我在rgee
Google Compute Engine 虚拟机中使用最后一个版本,在我的情况下是在 RStudio Server 中:
library("googleCloudStorageR")
library("rgee")
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
library("googleCloudStorageR")
Setting scopes to https://www.googleapis.com/auth/devstorage.full_control and https://www.googleapis.com/auth/cloud-platform
Successfully auto-authenticated via /home/forestcloud/fc_CMPC_v01/API_code/fc-vm-v1-69de84eb838a.json
Set default bucket name to 'f-cmpc-s2'
> library("rgee")
> # Initialize the Earth Engine session -----------------------------------------
> ee_Initialize("f-cmpc-s2",gcs = TRUE)
── rgee 1.0.9 ──────────────────────────────────────────────────────────────────────────────────────── earthengine-api 0.1.266 ──
✓ email: f-cmpc-s2
✓ GCS credentials: FOUND
✓ Initializing Google Earth Engine: DONE!
✓ Earth Engine user: users/fitlab
─────────────────────────────────────────────────────────────────────────────────────────
我的“f-cmpc-s2”容器在成功自动验证和 GCS 凭据中看起来不错,但如果我尝试下载 S2 映像:
# Download the results
s2_ic_local <- ee_imagecollection_to_local(
ic = s2_roi,
scale = 10,
region = roi,
container = "f-cmpc-s2",
via = "gcs",
dsn = paste0(gsub(".shp","",ID_all[6]))
)
-------------------------------------------------------------------------------- Downloading ImageCollection - via gcs --- region parameters
sfg : POLYGON ((-54.1952 -30.7182 .... .70724, -54.1952 -30.71826))
CRS : GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563, .....
geodesic : TRUE
evenOdd : TRUE
Downloading: VILAPALMA042A20210512T133229_20210512T133223_T21JYF.tif ERROR in Earth Engine servers: Unable to write to bucket f-cmpc-s2 (permission denied).
Error in ee_monitoring(task = task, quiet = quiet) :
ee_monitoring was forced to stop before getting results
Unable to write to bucket f-cmpc-s2 (permission denied)
,尽管我将 Google 存储中的所有权限授予 gcs-auth-file@fc-vm-v1.iam.gserviceaccount.com 并且 *json 键是更新:
请帮忙解决一下?
解决方案
推荐阅读
- android - 带有模拟测试的 NullPointerException
- javascript - 设置 Access-Control-Allow-Headers: *(如果有)的安全含义是什么?
- javascript - 如何使用 GridFS 将图像文件发布到 MongoDB 并获取?
- azure - 我可以通过/在 Power BI 中利用 Azure 认知搜索吗?
- logging - 如何为 gcp 中的组提供权限(创建/查看)并启用相同的日志记录
- javascript - 将音频文件从 Django 后端流式传输到 Vue.js 前端
- ios - Swift 5 重置焦点
- python-3.x - 如何使用 python 和 pyzbar 检测二维码
- jenkins - 我如何实现语义版本控制
- php - PHP `error_reporting` 的默认值是多少?