ee.FeatureCollection.toDictionary

Estrai le proprietà da una funzionalità come dizionario.

UtilizzoResi
FeatureCollection.toDictionary(properties)Dizionario
ArgomentoTipoDettagli
questo: elementElementoLa funzionalità da cui estrarre la proprietà.
propertiesElenco, valore predefinito: nullL'elenco delle proprietà da estrarre. Il valore predefinito è tutte le proprietà non di sistema.

Esempi

Editor di codice (JavaScript)

// FeatureCollection of power plants.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants');

print('All non-system FeatureCollection properties as an ee.Dictionary',
      fc.toDictionary());
print('Selected properties as an ee.Dictionary',
      fc.toDictionary(['description', 'provider']));

Configurazione di Python

Consulta la pagina Ambiente Python per informazioni sull'API Python e sull'utilizzo di geemap per lo sviluppo interattivo.

import ee
import geemap.core as geemap

Colab (Python)

# FeatureCollection of power plants.
fc = ee.FeatureCollection('WRI/GPPD/power_plants')

print('All non-system FeatureCollection properties as an ee.Dictionary:',
      fc.toDictionary().getInfo())
print('Selected properties as an ee.Dictionary:',
      fc.toDictionary(['description', 'provider']).getInfo())