ee.FeatureCollection.toDictionary

Mengekstrak properti dari fitur sebagai kamus.

PenggunaanHasil
FeatureCollection.toDictionary(properties)Kamus
ArgumenJenisDetail
ini: elementElemenFitur untuk mengekstrak properti.
propertiesDaftar, default: nullDaftar properti yang akan diekstrak. Secara default, semua properti non-sistem.

Contoh

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

Penyiapan Python

Lihat halaman Lingkungan Python untuk mengetahui informasi tentang Python API dan penggunaan geemap untuk pengembangan interaktif.

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