Die Earth Engine hat
nicht kommerzielle Kontingentstufen eingeführt, um gemeinsam genutzte Rechenressourcen zu schützen und eine zuverlässige Leistung für alle sicherzustellen. Für nicht kommerzielle Projekte wird standardmäßig die Community-Stufe verwendet. Sie können die Stufe eines Projekts aber jederzeit ändern.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.FeatureCollection.sort
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Sortiert eine Sammlung nach dem angegebenen Attribut.
Gibt die sortierte Sammlung zurück.
| Nutzung | Ausgabe |
|---|
FeatureCollection.sort(property, ascending) | Sammlung |
| Argument | Typ | Details |
|---|
So gehts: collection | Sammlung | Die Sammlung. |
property | String | Das Attribut, nach dem sortiert werden soll. |
ascending | Boolesch, optional | Gibt an, ob in aufsteigender oder absteigender Reihenfolge sortiert werden soll. Der Standardwert ist „true“ (aufsteigend). |
Beispiele
Code-Editor (JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
print('Belgium power plants in ascending order by capacity',
fc.sort('capacitymw'));
print('Belgium power plants in descending order by capacity',
fc.sort('capacitymw', false));
Python einrichten
Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite
Python-Umgebung.
import ee
import geemap.core as geemap
Colab (Python)
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
display('Belgium power plants in ascending order by capacity:',
fc.sort('capacitymw'))
display('Belgium power plants in descending order by capacity:',
fc.sort('capacitymw', False))
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-10-30 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-10-30 (UTC)."],[],["The `sort` method arranges a collection by a given property. It takes the property name (string) as a required argument and an optional boolean `ascending` (defaulting to `true`) to specify the sort order. The method returns the sorted collection. Examples demonstrate sorting a FeatureCollection of Belgian power plants by 'capacitymw' in both ascending and descending order. The method works both in javascript and Python.\n"]]