GEEDownload使用方法
概述
GEEDownload是一个从Google Earth Engine下载ImageCollection类型遥感影像的库。项目解决了现有常用方法中使用的'users/fitoprincipe/geetools:batch'库存在的任务创建缓慢、浏览器容易崩溃的问题,提供了一种更快速的下载方案。
使用方法
1. 导入库
var lib = require('users/zhaoyuhui012/libs:libImageCollectionDownloader')2. 设置下载可选参数
下载可选参数为object类型。除time_format和folder外与官方Export.image.toDrive相同。包括:
description, dimensions, crs, crsTransform, shardSize, fileDimensions, skipEmptyTiles... 在参数fileNamePrefix中,可以选择%time和%index两种占位符,它们会被替换为时间字符串和GEE生成的index。
time_format用于控制参数fileNamePrefix中%time的格式,提供以下占位符(以2025-03-05 08:05:30为例):
| Directive | Meaning | Example |
|---|---|---|
| %Y | year | 2025 |
| %m | month | 03 |
| %d | day | 05 |
| %H | hour | 08 |
| %M | minute | 05 |
| %S | second | 30 |
| %% | Escaped % character | % |
示例:
options = {
'fileNamePrefix': '%index_%time',
'time_format': '%Y%m%d'
}3. 下载
lib.downloadImageCollection(
collection, // your collection, type ee.ImageCollection
folder, // exported folder in your Google Drive, type string
options // download options, type object
)