공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 액세스 권한을 유지하기 위해
비상업용 자격 요건을 인증해야 합니다. 2025년 9월 26일까지 인증하지 않으면 액세스가 보류될 수 있습니다.
ee.Image.addBands
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
첫 번째 입력에서 복사된 모든 밴드와 두 번째 입력에서 선택된 밴드를 포함하는 이미지를 반환합니다. 선택적으로 첫 번째 이미지의 밴드를 이름이 같은 밴드로 덮어쓸 수 있습니다. 새 이미지는 첫 번째 입력 이미지의 메타데이터와 설치 공간을 갖습니다.
| 사용 | 반환 값 |
|---|
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)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-10-30(UTC)
[null,null,["최종 업데이트: 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"]]