公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.ImageCollection.map
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將演算法對應至集合。
傳回對應的集合。
用量 | 傳回 |
---|
ImageCollection.map(algorithm, dropNulls) | 集合 |
引數 | 類型 | 詳細資料 |
---|
這個:collection | 集合 | Collection 執行個體。 |
algorithm | 函式 | 要對集合的圖片或特徵進行對應的操作。JavaScript 函式,可接收圖片或特徵並傳回一個。函式只會呼叫一次,結果會擷取為說明,因此無法執行命令式作業或依附外部狀態。 |
dropNulls | 布林值 (選填) | 如果是 true,對應的演算法可以傳回空值,且系統會捨棄傳回空值的元素。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eApplies a user-defined function (algorithm) to each element within an ImageCollection.\u003c/p\u003e\n"],["\u003cp\u003eReturns a new collection containing the results of applying the algorithm to each element.\u003c/p\u003e\n"],["\u003cp\u003eOptionally allows for removing elements where the algorithm returns null values using the \u003ccode\u003edropNulls\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.map\n\n\u003cbr /\u003e\n\nMaps an algorithm over a collection.\n\n\u003cbr /\u003e\n\nReturns the mapped collection.\n\n| Usage | Returns |\n|-------------------------------------------------|------------|\n| ImageCollection.map`(algorithm, `*dropNulls*`)` | Collection |\n\n| Argument | Type | Details |\n|--------------------|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `algorithm` | Function | The operation to map over the images or features of the collection. A JavaScript function that receives an image or features and returns one. The function is called only once and the result is captured as a description, so it cannot perform imperative operations or rely on external state. |\n| `dropNulls` | Boolean, optional | If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped. |"]]