ee.FeatureCollection.toDictionary

Eigenschaften eines Features als Dictionary extrahieren.

NutzungAusgabe
FeatureCollection.toDictionary(properties)Wörterbuch
ArgumentTypDetails
So gehts: elementElementDas Feature, aus dem das Attribut extrahiert werden soll.
propertiesListe, Standard: nullDie Liste der zu extrahierenden Attribute. Standardmäßig sind alle Nicht-System-Properties ausgewählt.

Beispiele

Code-Editor (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']));

Python einrichten

Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite Python-Umgebung.

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