公告:凡是在
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。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]