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
)