ee.Dictionary.toImage

একটি অভিধানে মান থেকে ধ্রুবকের একটি চিত্র তৈরি করে। ছবির ব্যান্ডগুলি নাম যুক্তি অনুসারে অর্ডার এবং নামকরণ করা হয়। কোনো নাম নির্দিষ্ট না থাকলে, ব্যান্ডগুলি আলফা-সংখ্যা অনুসারে সাজানো হয়।

ব্যবহার রিটার্নস
Dictionary. toImage ( names ) ছবি
যুক্তি টাইপ বিস্তারিত
এই: dictionary অভিধান রূপান্তর করার অভিধান।
names তালিকা, ডিফল্ট: নাল আউটপুট ব্যান্ডের ক্রম।

উদাহরণ

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

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

var selectedKeysImg = dict.toImage(['B1', 'B2']);
print('Selected keys image band names', selectedKeysImg.bandNames());

var allKeysImg = dict.toImage();
print('All keys image band names', allKeysImg.bandNames());

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

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

selected_keys_img = dic.toImage(['B1', 'B2'])
print('Selected keys image band names:',
      selected_keys_img.bandNames().getInfo())

all_keys_img = dic.toImage()
print('All keys image band names:', all_keys_img.bandNames().getInfo())