公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.ImageCollection.limit
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將集合限制為指定數量的元素,並可選擇先依指定屬性排序。
傳回受限的集合。
用量 | 傳回 |
---|
ImageCollection.limit(max, property, ascending) | 集合 |
引數 | 類型 | 詳細資料 |
---|
這個:collection | 集合 | Collection 執行個體。 |
max | 數字 | 集合的限制數量。 |
property | 字串 (選用) | 用於排序的屬性 (如要排序)。 |
ascending | 布林值 (選填) | 指定要依遞增或遞減順序排序。預設值為 true (遞增)。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eLimits the number of elements within a collection to a specified maximum.\u003c/p\u003e\n"],["\u003cp\u003eOptionally sorts the collection by a given property before limiting the results, in either ascending or descending order.\u003c/p\u003e\n"],["\u003cp\u003eReturns the modified collection with the applied limit and optional sorting.\u003c/p\u003e\n"]]],["The `limit` method restricts a collection to a specified number of elements (`max`). It optionally sorts the collection beforehand by a given `property`. Sorting can be in ascending (default) or descending order, controlled by the `ascending` argument. The method operates on a `Collection` instance and returns the modified, limited `Collection`. The method requires a number for max and accepts an optional String for the property to sort by and an optional boolean for the sort direction.\n"],null,["# ee.ImageCollection.limit\n\n\u003cbr /\u003e\n\nLimit a collection to the specified number of elements, optionally sorting them by a specified property first.\n\n\u003cbr /\u003e\n\nReturns the limited collection.\n\n| Usage | Returns |\n|------------------------------------------------------------|------------|\n| ImageCollection.limit`(max, `*property* `, `*ascending*`)` | Collection |\n\n| Argument | Type | Details |\n|--------------------|-------------------|------------------------------------------------------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `max` | Number | The number to limit the collection to. |\n| `property` | String, optional | The property to sort by, if sorting. |\n| `ascending` | Boolean, optional | Whether to sort in ascending or descending order. The default is true (ascending). |"]]