Ankündigung : Alle nicht kommerziellen Projekte, die vor dem
15. April 2025 für die Nutzung von Earth Engine registriert wurden, müssen
die Berechtigung zur nicht kommerziellen Nutzung bestätigen , um den Zugriff aufrechtzuerhalten. Wenn Sie Ihren Status nicht bis zum 26. September 2025 bestätigen, wird Ihr Zugriff möglicherweise eingeschränkt.
Feedback geben
ee.ImageCollection.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 ImageCollection. 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)
// A Landsat 8 TOA image collection (2 months of images at a specific point).
var col = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . Point ( - 90.70 , 34.71 ))
. filterDate ( '2020-07-01' , '2020-09-01' );
print ( 'Collection' , col );
// Sort the collection in ASCENDING order of image cloud cover.
var colCldSortAsc = col . sort ( 'CLOUD_COVER' );
print ( 'Cloud cover ascending' , colCldSortAsc );
// Display the image with the least cloud cover.
var visParams = {
bands : [ 'B4' , 'B3' , 'B2' ],
min : 0.01 ,
max : 0.25
};
Map . setCenter ( - 90.70 , 34.71 , 9 );
Map . addLayer ( colCldSortAsc . first (), visParams , 'Least cloudy' );
// Sort the collection in DESCENDING order of image cloud cover.
var colCldSortDesc = col . sort ( 'CLOUD_COVER' , false );
print ( 'Cloud cover descending' , colCldSortDesc );
// Display the image with the most cloud cover.
Map . addLayer ( colCldSortDesc . first (), visParams , 'Most cloudy' );
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)
# A Landsat 8 TOA image collection (2 months of images at a specific point).
col = (
ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . Point ( - 90.70 , 34.71 ))
. filterDate ( '2020-07-01' , '2020-09-01' )
)
display ( 'Collection' , col )
# Sort the collection in ASCENDING order of image cloud cover.
col_cld_sort_asc = col . sort ( 'CLOUD_COVER' )
display ( 'Cloud cover ascending' , col_cld_sort_asc )
# Display the image with the least cloud cover.
vis_params = { 'bands' : [ 'B4' , 'B3' , 'B2' ], 'min' : 0.01 , 'max' : 0.25 }
m = geemap . Map ()
m . set_center ( - 90.70 , 34.71 , 9 )
m . add_layer ( col_cld_sort_asc . first (), vis_params , 'Least cloudy' )
# Sort the collection in DESCENDING order of image cloud cover.
col_cld_sort_desc = col . sort ( 'CLOUD_COVER' , False )
display ( 'Cloud cover descending' , col_cld_sort_desc )
# Display the image with the most cloud cover.
m . add_layer ( col_cld_sort_desc . first (), vis_params , 'Most cloudy' )
m
Feedback geben
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-29 (UTC).
Haben Sie Feedback für uns?
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-29 (UTC)."],[],[]]