ee.FeatureCollection.toList

Gibt die Elemente einer Sammlung als Liste zurück.

NutzungAusgabe
FeatureCollection.toList(count, offset)Liste
ArgumentTypDetails
So gehts: collectionFeatureCollectionDie abzurufende Eingabesammlung.
countGanzzahlDie maximale Anzahl der abzurufenden Elemente.
offsetGanzzahl, Standardwert: 0Die Anzahl der Elemente, die am Anfang verworfen werden sollen. Wenn festgelegt, werden (offset + count) Elemente abgerufen und die ersten „offset“-Elemente verworfen.

Beispiele

Code-Editor (JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

print('First 5 features to an ee.List', fc.toList(5));

print('Second 5 features to an ee.List', fc.toList(5, 5));

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('First 5 features to an ee.List:', fc.toList(5))

display('Second 5 features to an ee.List:', fc.toList(5, 5))