ee.FeatureCollection.toDictionary

Извлечь свойства из объекта в виде словаря.

Использование Возврат
FeatureCollection. toDictionary ( properties ) Словарь
Аргумент Тип Подробности
это: element Элемент Функция, из которой необходимо извлечь свойство.
properties Список, по умолчанию: null Список свойств для извлечения. По умолчанию — все несистемные свойства.

Примеры

Редактор кода (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

Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .

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