公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Export.video.toDrive
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建批量任务,以将 ImageCollection 导出为视频到云端硬盘。集合必须仅包含 RGB 图片。您可以在“任务”标签页中开始任务。“crsTransform”“scale”和“dimensions”是互斥的。
用法 | 返回 |
---|
Export.video.toDrive(collection, description, folder, fileNamePrefix, framesPerSecond, dimensions, region, scale, crs, crsTransform, maxPixels, maxFrames, priority) | |
参数 | 类型 | 详细信息 |
---|
collection | ImageCollection | 要导出的图片集合。 |
description | 字符串,可选 | 任务的简明易懂的名称。可以包含字母、数字、-、_(不能包含空格)。默认为“myExportVideoTask”。 |
folder | 字符串,可选 | 导出文件将位于的 Google 云端硬盘文件夹。注意:(a) 如果文件夹名称存在于任何级别,则输出会写入该文件夹;(b) 如果存在重复的文件夹名称,则输出会写入最近修改的文件夹;(c) 如果文件夹名称不存在,则会在根目录中创建一个新文件夹;(d) 带有分隔符(例如“path/to/file”)的文件夹名称会被解读为字面字符串,而不是系统路径。默认为云端硬盘根目录。 |
fileNamePrefix | 字符串,可选 | 文件名前缀。可以包含字母、数字、-、_(不能包含空格)。默认为说明。 |
framesPerSecond | 数字,可选 | 导出视频的帧速率。必须是一个介于 0.1 到 100 之间的值。默认为 1。 |
dimensions | Number|String,可选 | 要用于导出图片的尺寸。接受单个正整数作为最大维度,或接受“WIDTHxHEIGHT”,其中 WIDTH 和 HEIGHT 均为正整数。 |
region | Geometry.LinearRing|Geometry.Polygon|String,可选 | 要导出的区域,以 LinearRing、Polygon 或坐标表示。这些值可以指定为 Geometry 对象或序列化为字符串的坐标。 |
scale | 数字,可选 | 分辨率(以每像素多少米为单位)。 |
crs | 字符串,可选 | 要用于导出图片的 CRS。默认为 Google 地图墨卡托投影,即 SR-ORG:6627。 |
crsTransform | 字符串,可选 | 用于导出图像的仿射转换。需要定义“crs”。 |
maxPixels | 数字,可选 | 限制导出中的像素数量。默认情况下,如果导出像素数超过 1 亿,您会看到一条错误消息。明确设置此值可提高或降低此限制。 |
maxFrames | 数字,可选 | 设置要导出的帧数上限。默认情况下,最多可以导出 1000 帧。通过明确设置此值,您可以提高或降低此限制。 |
priority | 数字,可选 | 任务在项目中的优先级。优先级较高的任务会更早安排。必须是介于 0 到 9999 之间的整数。默认值为 100。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eExports an ImageCollection containing only RGB images as a video to Google Drive.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of video parameters such as frame rate, dimensions, region, and resolution.\u003c/p\u003e\n"],["\u003cp\u003eProvides options to specify the output filename, folder in Google Drive, and task priority.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define the coordinate system and affine transformation for the exported video.\u003c/p\u003e\n"],["\u003cp\u003eLimits can be set on the maximum number of pixels and frames in the exported video to manage processing resources.\u003c/p\u003e\n"]]],[],null,["# Export.video.toDrive\n\n\u003cbr /\u003e\n\nCreates a batch task to export an ImageCollection as a video to Drive. The collection must only contain RGB images. Tasks can be started from the Tasks tab. \"crsTransform\", \"scale\", and \"dimensions\" are mutually exclusive.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| `Export.video.toDrive(collection, `*description* `, `*folder* `, `*fileNamePrefix* `, `*framesPerSecond* `, `*dimensions* `, `*region* `, `*scale* `, `*crs* `, `*crsTransform* `, `*maxPixels* `, `*maxFrames* `, `*priority*`)` | |\n\n| Argument | Type | Details |\n|-------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `collection` | ImageCollection | The image collection to export. |\n| `description` | String, optional | A human-readable name of the task. May contain letters, numbers, -, _ (no spaces). Defaults to \"myExportVideoTask\". |\n| `folder` | String, optional | The Google Drive Folder that the export will reside in. Note: (a) if the folder name exists at any level, the output is written to it, (b) if duplicate folder names exist, output is written to the most recently modified folder, (c) if the folder name does not exist, a new folder will be created at the root, and (d) folder names with separators (e.g. 'path/to/file') are interpreted as literal strings, not system paths. Defaults to Drive root. |\n| `fileNamePrefix` | String, optional | The filename prefix. May contain letters, numbers, -, _ (no spaces). Defaults to the description. |\n| `framesPerSecond` | Number, optional | The framerate of the exported video. Must be a value between 0.1 and 100. Defaults to 1. |\n| `dimensions` | Number\\|String, optional | The dimensions to use for the exported image. Takes either a single positive integer as the maximum dimension or \"WIDTHxHEIGHT\" where WIDTH and HEIGHT are each positive integers. |\n| `region` | Geometry.LinearRing\\|Geometry.Polygon\\|String, optional | A LinearRing, Polygon, or coordinates representing region to export. These may be specified as the Geometry objects or coordinates serialized as a string. |\n| `scale` | Number, optional | Resolution in meters per pixel. |\n| `crs` | String, optional | CRS to use for the exported image. Defaults to the Google Maps Mercator projection, SR-ORG:6627. |\n| `crsTransform` | String, optional | Affine transform to use for the exported image. Requires \"crs\" to be defined. |\n| `maxPixels` | Number, optional | Restrict the number of pixels in the export. By default, you will see an error if the export exceeds 1e8 pixels. Setting this value explicitly allows one to raise or lower this limit. |\n| `maxFrames` | Number, optional | Set the maximum number of frames to export. By default, a maximum of 1000 frames may be exported. By setting this explicitly, you may raise or lower this limit. |\n| `priority` | Number, optional | The priority of the task within the project. Higher priority tasks are scheduled sooner. Must be an integer between 0 and 9999. Defaults to 100. |"]]