ee.Dictionary

একটি নতুন অভিধান তৈরি করে।

ব্যবহার রিটার্নস
ee.Dictionary( dict ) অভিধান
যুক্তি টাইপ বিস্তারিত
dict ComputedObject|বস্তু, ঐচ্ছিক একটি অভিধানে রূপান্তর করার জন্য একটি বস্তু। এই কনস্ট্রাক্টর নিম্নলিখিত ধরনের গ্রহণ করে: 1) আরেকটি অভিধান। 2) কী/মান জোড়ার একটি তালিকা। 3) একটি নাল বা কোন যুক্তি (একটি খালি অভিধান তৈরি করা)

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

// A dictionary input (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = {
  B1: 182,
  B2: 219,
  B3: 443
};
print('ee.Dictionary from dictionary input', ee.Dictionary(dict));

// A list of key/value pairs (from previous dictionary).
var list = [
  'B1', 182,
  'B2', 219,
  'B3', 443
];
print('ee.Dictionary from list input', ee.Dictionary(list));

// To create an ee.Dictionary from two corresponding lists of keys and values,
// use the ee.Dictionary.fromLists constructor.
var keys = ['B1', 'B2', 'B3'];
var values = [182, 219, 443];
print('Dictionary from lists of keys and values',
      ee.Dictionary.fromLists(keys, values));

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# A dictionary input (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = {
    'B1': 182,
    'B2': 219,
    'B3': 443
}
print('ee.Dictionary from dictionary input:', ee.Dictionary(dic).getInfo())

# A list of key/value pairs (from previous dictionary).
lst = [
    'B1', 182,
    'B2', 219,
    'B3', 443
]
print('ee.Dictionary from list input', ee.Dictionary(lst).getInfo())