ee.FeatureCollection.aggregate_first

Agrega uma determinada propriedade dos objetos em uma coleção, calculando o valor da propriedade do primeiro objeto na coleção.

UsoRetorna
FeatureCollection.aggregate_first(property)
ArgumentoTipoDetalhes
isso: collectionFeatureCollectionA coleção para agregar.
propertyStringA propriedade a ser usada de cada elemento da coleção.

Exemplos

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

Configuração do Python

Consulte a página Ambiente Python para informações sobre a API Python e como usar geemap para desenvolvimento interativo.

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