ee.FeatureCollection.aggregate_first

Agrega una propiedad determinada de los objetos de una colección y calcula el valor de la propiedad del primer objeto de la colección.

UsoMuestra
FeatureCollection.aggregate_first(property)
ArgumentoTipoDetalles
esta: collectionFeatureCollectionEs la colección para agregar.
propertyStringEs la propiedad que se usará de cada elemento de la colección.

Ejemplos

Editor de código (JavaScript)

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

print('Fuel source for first power plant in the collection',
      fc.aggregate_first('fuel1'));  // Wind

Configuración de Python

Consulta la página Entorno de Python para obtener información sobre la API de Python y el uso de geemap para el desarrollo interactivo.

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('Fuel source for first power plant in the collection:',
      fc.aggregate_first('fuel1').getInfo())  # Wind