标签 遥感 下的文章

概述

GEEDownload是一个从Google Earth Engine下载ImageCollection类型遥感影像的库。项目解决了现有常用方法中使用的'users/fitoprincipe/geetools:batch'库存在的任务创建缓慢、浏览器容易崩溃的问题,提供了一种更快速的下载方案。

使用方法

1. 导入库

var lib = require('users/zhaoyuhui012/libs:libImageCollectionDownloader')

2. 设置下载可选参数

下载可选参数为object类型。除time_formatfolder外与官方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为例):

DirectiveMeaningExample
%Yyear2025
%mmonth03
%dday05
%Hhour08
%Mminute05
%Ssecond30
%%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
)