ee.Dictionary.getGeometry

Извлекает именованное значение геометрии из словаря.

Использование Возврат
Dictionary. getGeometry (key) Геометрия
Аргумент Тип Подробности
это: dictionary Словарь
key Нить

Примеры

Редактор кода (JavaScript)

// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443,
  Geometry: ee.Geometry.Point([-122.01, 36.97])
});

print('The "Geometry" value as an ee.Geometry object',
      dict.getGeometry('Geometry'));

Настройка Python

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

import ee
import geemap.core as geemap

Colab (Python)

# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
    'B1': 182,
    'B2': 219,
    'B3': 443,
    'Geometry': ee.Geometry.Point([-122.01, 36.97])
})

print('The "Geometry" value as an ee.Geometry object',
      dic.getGeometry('Geometry').getInfo(), sep='\n')