ee.Dictionary.getString

사전에서 이름이 지정된 문자열 값을 추출합니다.

사용반환 값
Dictionary.getString(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,
  Region: 'The Forest of Nisene Marks State Park'
});

print('The "Region" value as an ee.String object', dict.getString('Region'));

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,
    'Region': 'The Forest of Nisene Marks State Park'
})

print('The "Region" value as an ee.String object:',
      dic.getString('Region').getInfo(), sep='\n')