公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Reducer.toCollection
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
:傳回收集輸入內容至 FeatureCollection 的縮減器。
用量 | 傳回 |
---|
ee.Reducer.toCollection(propertyNames, numOptional) | 縮減函式 |
引數 | 類型 | 詳細資料 |
---|
propertyNames | 清單 | 將在每個輸出特徵上定義的屬性名稱,決定縮減器輸入的數量。 |
numOptional | 整數,預設值為 0 | 最後的 numOptional 輸入內容會視為選用,其他輸入內容必須為非空值,否則輸入元組會遭到捨棄。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eCreates a reducer that gathers input data and organizes it into a FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eRequires a list of property names to define the features within the collection.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying optional inputs using \u003ccode\u003enumOptional\u003c/code\u003e, where non-optional inputs must be non-null to avoid data drops.\u003c/p\u003e\n"]]],[],null,["# ee.Reducer.toCollection\n\nReturns a reducer that collects its inputs into a FeatureCollection.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------|---------|\n| `ee.Reducer.toCollection(propertyNames, `*numOptional*`)` | Reducer |\n\n| Argument | Type | Details |\n|-----------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `propertyNames` | List | The property names that will be defined on each output feature; determines the number of reducer inputs. |\n| `numOptional` | Integer, default: 0 | The last numOptional inputs will be considered optional; the other inputs must be non-null or the input tuple will be dropped. |"]]