ee.FeatureCollection.size

Renvoie le nombre d'éléments de la collection.

UtilisationRenvoie
FeatureCollection.size()Nombre entier
ArgumentTypeDétails
ceci : collectionFeatureCollectionCollection à comptabiliser.

Exemples

Éditeur de code (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());

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

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())