ee.ImageCollection.limit
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Beschränkt eine Sammlung auf die angegebene Anzahl von Elementen und sortiert sie optional zuerst nach einer angegebenen Eigenschaft.
Gibt die eingeschränkte Sammlung zurück.
Nutzung | Ausgabe |
---|
ImageCollection.limit(max, property, ascending) | Sammlung |
Argument | Typ | Details |
---|
So gehts: collection | Sammlung | Die Sammlung. |
max | Zahl | Die Anzahl der Elemente, auf die die Sammlung begrenzt werden soll. |
property | String, optional | Die Property, nach der sortiert werden soll, falls eine Sortierung erfolgt. |
ascending | Boolesch, optional | Gibt an, ob in aufsteigender oder absteigender Reihenfolge sortiert werden soll. Der Standardwert ist „true“ (aufsteigend). |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\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). |"]]