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 设置

如需了解 Python API 和如何使用 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')