Google云端硬盘、Google云存储或EarthEngine中的新资产

【问题描述】:

我正在使用此代码生成 ge 图像

image = ee.ImageCollection(satellite) 
            .filterDate(startdate, enddate) 
            .filterBounds(ee.Geometry.Point(centroid[0], centroid[1])) 
            .select(bands) 

图片[1]-Google云端硬盘、Google云存储或EarthEngine中的新资产-唐朝资源网

.map(removeClouds) .mean() type(image)

图片[2]-Google云端硬盘、Google云存储或EarthEngine中的新资产-唐朝资源网

如何将生成的图像保存为本地 GeoTIFF 文件,即存储在运行脚本的台式计算机上的文件?

【讨论】:

标签:pythongoogle-earth-engine

[解决方案1]:

图片[3]-Google云端硬盘、Google云存储或EarthEngine中的新资产-唐朝资源网

您不能将其直接下载到本地目录。如此处所述,“由于 Google Earth Engine 数据导出是异步的,因此目标也是基于云的。您可以从 Google Drive、Google Cloud Storage 或 Earth Engine 中的新资产中进行选择。”

对于从 Google Drive 中提取图像,此答案可以帮助您。

【讨论】:

[解决方案2]:

不确定 ImageCollection,但您可以通过以下方式将图像下载到本地驱动器:

# Multi-band GeoTIFF file.
url = img.getDownloadUrl({
    'bands': ['B3', 'B8', 'B11'],
    'region': region,
    'scale': 20,

    'format': 'GEO_TIFF'
})
response = requests.get(url)
with open('multi_band.tif', 'wb') as fd:
  fd.write(response.content)

© 版权声明
THE END
喜欢就支持一下吧
点赞226赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容