ee.Dictionary.getString

یک مقدار رشته نامگذاری شده را از فرهنگ لغت استخراج می کند.

استفاده برمی گرداند
Dictionary. getString (key) رشته
استدلال تایپ کنید جزئیات
این: dictionary فرهنگ لغت
key رشته

نمونه ها

ویرایشگر کد (جاوا اسکریپت)

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

راه اندازی پایتون

برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.

import ee
import geemap.core as geemap

کولب (پایتون)

# 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')