ee.FeatureCollection.size

Gibt die Anzahl der Elemente in der Sammlung zurück.

NutzungAusgabe
FeatureCollection.size()Ganzzahl
ArgumentTypDetails
So gehts: collectionFeatureCollectionDie zu zählende Sammlung.

Beispiele

Code-Editor (JavaScript)

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

print('Number of power plants in Belgium', fc.size());

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"')

print('Number of power plants in Belgium:', fc.size().getInfo())