Earth Engine は、共有コンピューティング リソースを保護し、すべてのユーザーに信頼性の高いパフォーマンスを提供するために、
非商用割り当て階層を導入しています。すべての非商用プロジェクトは、
2026 年 4 月 27 日までに割り当て階層を選択する必要があります。選択しない場合は、デフォルトでコミュニティ階層が使用されます。階層の割り当ては、
2026 年 4 月 27 日に(階層の選択日に関係なく)すべてのプロジェクトで有効になります。
詳細
ee.Dictionary.select
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定されたキーのみを含むディクショナリを返します。
| 用途 | 戻り値 |
|---|
Dictionary.select(selectors, ignoreMissing) | Dictionary |
| 引数 | タイプ | 詳細 |
|---|
これ: dictionary | Dictionary | |
selectors | リスト | 選択するキーまたは正規表現のリスト。 |
ignoreMissing | ブール値。デフォルト値は false です。 | 少なくとも 1 つのキーと一致しないセレクタを無視します。 |
例
コードエディタ(JavaScript)
// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
B1: 182,
B2: 219,
B3: 443
});
print('Select keys by name', dict.select(['B1', 'B2']));
print('Select keys by regex', dict.select(['B[1-2]']));
print('Set ignoreMissing as true to avoid an unmatched key error',
dict.select({selectors: ['B1', 'B2', 'Region'], ignoreMissing: true}));
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
})
display('Select keys by name:', dic.select(['B1', 'B2']))
display('Select keys by regex:', dic.select(['B[1-2]']))
dic_select = dic.select(**{'selectors': ['B1', 'B2', 'Region'],
'ignoreMissing': True})
display('Set ignoreMissing as true to avoid an unmatched key error:',
dic_select)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-10-30 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-10-30 UTC。"],[],[]]