お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
ee.Dictionary.toImage
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
辞書内の値から定数のイメージを作成します。イメージのバンドは、names 引数に従って順序付けられ、名前が付けられます。名前が指定されていない場合、帯域は英数字順に並べ替えられます。
用途 | 戻り値 |
---|
Dictionary.toImage(names) | 画像 |
引数 | タイプ | 詳細 |
---|
これ: dictionary | Dictionary | 変換する辞書。 |
names | リスト、デフォルト: null | 出力バンドの順序。 |
例
コードエディタ(JavaScript)
// 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());
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
})
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())
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[],[]]