ee.FeatureCollection.toDictionary

Extrae las propiedades de un atributo como un diccionario.

UsoMuestra
FeatureCollection.toDictionary(properties)Diccionario
ArgumentoTipoDetalles
esta: elementElementoEs la entidad de la que se extraerá la propiedad.
propertiesLista, valor predeterminado: nullLista de propiedades que se extraerán. El valor predeterminado son todas las propiedades que no son del sistema.

Ejemplos

Editor de código (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']));

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