Earth Engine は、共有コンピューティング リソースを保護し、すべてのユーザーに信頼性の高いパフォーマンスを提供するために、
非商用割り当て階層 を導入しています。すべての非商用プロジェクトは、
2026 年 4 月 27 日 までに割り当て階層を選択する必要があります。選択しない場合は、デフォルトでコミュニティ階層が使用されます。階層の割り当ては、
2026 年 4 月 27 日 に(階層の選択日に関係なく)すべてのプロジェクトで有効になります。
詳細
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
フィードバックを送信
ee.Image.addBands
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
最初の入力からコピーされたすべてのバンドと、2 番目の入力から選択されたバンドを含むイメージを返します。必要に応じて、最初のイメージの同じ名前のバンドを上書きします。新しい画像には、最初の入力画像のメタデータとフットプリントが含まれます。
用途 戻り値 Image. addBands (srcImg, names , overwrite )画像
引数 タイプ 詳細 これ: dstImg 画像 バンドのコピー先となる画像。 srcImg画像 コピーするバンドを含む画像。 namesリスト、デフォルト: null コピーする帯域名のリスト(省略可)。names が省略された場合、srcImg のすべてのバンドがコピーされます。 overwriteブール値。デフォルト値は false です。 true の場合、`srcImg` のバンドは `dstImg` の同じ名前のバンドをオーバーライドします。それ以外の場合、新しいバンドは数値の接尾辞で名前が変更されます(`foo` から `foo_1`。ただし、`foo_1` が存在する場合は `foo_2` など)。
例
コードエディタ(JavaScript)
// A Sentinel-2 surface reflectance image.
var img = ee . Image ( 'COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG' );
print ( 'Original image' , img );
// Scale reflectance bands and overwrite the original bands.
var reflBands = img . select ( 'B.*' ). divide ( 10000 );
img = img . addBands ({
srcImg : reflBands ,
overwrite : true
});
// Compute and add a single band (NDVI).
var ndvi = img . normalizedDifference ([ 'B8' , 'B4' ]). rename ( 'NDVI' );
img = img . addBands ( ndvi );
// Compute and add multiple bands (NDWI and NBR).
var ndwi = img . normalizedDifference ([ 'B3' , 'B8' ]). rename ( 'NDWI' );
var nbr = img . normalizedDifference ([ 'B8' , 'B12' ]). rename ( 'NBR' );
var newBands = ee . Image ([ ndwi , nbr ]);
img = img . addBands ( newBands );
print ( 'Image with added/modified bands' , img );
Python の設定
Python API とインタラクティブな開発での geemap の使用については、
Python 環境 のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# A Sentinel-2 surface reflectance image.
img = ee . Image ( 'COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG' )
display ( 'Original image:' , img )
# Scale reflectance bands and overwrite the original bands.
refl_bands = img . select ( 'B.*' ) . divide ( 10000 )
img = img . addBands ( srcImg = refl_bands , overwrite = True )
# Compute and add a single band (NDVI).
ndvi = img . normalizedDifference ([ 'B8' , 'B4' ]) . rename ( 'NDVI' )
img = img . addBands ( ndvi )
# Compute and add multiple bands (NDWI and NBR).
ndwi = img . normalizedDifference ([ 'B3' , 'B8' ]) . rename ( 'NDWI' )
nbr = img . normalizedDifference ([ 'B8' , 'B12' ]) . rename ( 'NBR' )
new_bands = ee . Image ([ ndwi , nbr ])
img = img . addBands ( new_bands )
display ( 'Image with added/modified bands:' , img )
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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。"],[],["The `addBands` function combines bands from two images. It copies all bands from the first image and specified or all bands from the second. The user can select specific bands from the second image to add. If band names overlap, the `overwrite` parameter determines if bands from the second image replace those in the first; otherwise, they're renamed with a numerical suffix. The resulting image retains the first image's metadata and footprint.\n"]]