小编A S*_*A S的帖子

如何使用Google Earth引擎的python API下载图像

我正在使用Google的Earth Engine API来访问LandSat图像。该程序如下所示,

import ee
ee.Initialize()
Run Code Online (Sandbox Code Playgroud)

加载landsat图像并选择三个波段。

landsat = ee.Image('LANDSAT/LC8_L1T_TOA
/LC81230322014135LGN00').select(['B4', 'B3', 'B2']);
Run Code Online (Sandbox Code Playgroud)

创建代表输出区域的几何。

geometry = ee.Geometry.Rectangle([116.2621, 39.8412, 116.4849, 40.01236]);
Run Code Online (Sandbox Code Playgroud)

导出图像,指定比例和区域。

 export.image.toDrive({
    image: landsat,
    description: 'imageToDriveExample',
    scale: 30,  
    region: geometry
    });
Run Code Online (Sandbox Code Playgroud)

它引发以下错误。

Traceback (most recent call last):
File "e6.py", line 11, in <module>
export.image.toDrive({
NameError: name 'export' is not defined
Run Code Online (Sandbox Code Playgroud)

请帮忙。我找不到正确的功能来下载图像。

python google-earth-engine

2
推荐指数
2
解决办法
6069
查看次数

标签 统计

google-earth-engine ×1

python ×1