공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.ImageCollection.toBands
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
컬렉션을 컬렉션에 있는 모든 이미지의 모든 밴드를 포함하는 단일 멀티 밴드 이미지로 변환합니다. 출력 밴드는 기존 밴드 이름에 출처 이미지 ID를 접두사로 붙여 명명됩니다 (예: 'image1_band1'). 참고: 최대 밴드 수는 5,000개입니다.
사용 | 반환 값 |
---|
ImageCollection.toBands() | 이미지 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: collection | ImageCollection | 입력 컬렉션입니다. |
예
코드 편집기 (JavaScript)
// A Landsat 8 TOA image collection (2 months of images at a specific point).
var col = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
.filterBounds(ee.Geometry.Point(-90.70, 34.71))
.filterDate('2020-07-01', '2020-09-01')
.select('B[4-5]'); // Get NIR and SWIR1 bands only.
print('Collection', col);
// Convert the image collection to a single multi-band image. Note that image ID
// ('system:index') is prepended to band names to delineate the source images.
var img = col.toBands();
print('Collection to bands', img);
// Band order is determined by collection order. Here, the collection is
// sorted in descending order of the date of observation (reverse of previous).
var bandOrder = col.sort('DATE_ACQUIRED', false).toBands();
print('Customized band order', bandOrder);
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
# A Landsat 8 TOA image collection (2 months of images at a specific point).
col = (
ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
.filterBounds(ee.Geometry.Point(-90.70, 34.71))
.filterDate('2020-07-01', '2020-09-01')
.select('B[4-5]')
) # Get NIR and SWIR1 bands only.
print('Collection:', col.getInfo())
# Convert the image collection to a single multi-band image. Note that image ID
# ('system:index') is prepended to band names to delineate the source images.
img = col.toBands()
print('Collection to bands:', img.getInfo())
# Band order is determined by collection order. Here, the collection is
# sorted in descending order of the date of observation (reverse of previous).
band_order = col.sort('DATE_ACQUIRED', False).toBands()
print('Customized band order:', band_order.getInfo())
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003etoBands()\u003c/code\u003e transforms an ImageCollection into a single multi-band image, combining all bands from each image within the collection.\u003c/p\u003e\n"],["\u003cp\u003eBand names in the output image are prefixed with the original image ID to identify their source.\u003c/p\u003e\n"],["\u003cp\u003eThe band order in the output image reflects the order of images within the input collection, which can be controlled using \u003ccode\u003esort()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere is a limit of 5000 bands for the output multi-band image.\u003c/p\u003e\n"]]],["The `toBands()` method converts an ImageCollection into a single multi-band Image. Each band in the resulting image corresponds to a band from an image in the collection. The output band names are prefixed with the source image's ID. The order of bands in the output image matches the order of images in the collection. Users can sort the collection to customize the band order, however the maximum band limit is 5000.\n"],null,["# ee.ImageCollection.toBands\n\nConverts a collection to a single multi-band image containing all of the bands of every image in the collection. Output bands are named by prefixing the existing band names with the image id from which it came (e.g., 'image1_band1'). Note: The maximum number of bands is 5000.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------|---------|\n| ImageCollection.toBands`()` | Image |\n\n| Argument | Type | Details |\n|--------------------|-----------------|-----------------------|\n| this: `collection` | ImageCollection | The input collection. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A Landsat 8 TOA image collection (2 months of images at a specific point).\nvar col = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')\n .filterBounds(ee.Geometry.Point(-90.70, 34.71))\n .filterDate('2020-07-01', '2020-09-01')\n .select('B[4-5]'); // Get NIR and SWIR1 bands only.\nprint('Collection', col);\n\n// Convert the image collection to a single multi-band image. Note that image ID\n// ('system:index') is prepended to band names to delineate the source images.\nvar img = col.toBands();\nprint('Collection to bands', img);\n\n// Band order is determined by collection order. Here, the collection is\n// sorted in descending order of the date of observation (reverse of previous).\nvar bandOrder = col.sort('DATE_ACQUIRED', false).toBands();\nprint('Customized band order', bandOrder);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# A Landsat 8 TOA image collection (2 months of images at a specific point).\ncol = (\n ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')\n .filterBounds(ee.Geometry.Point(-90.70, 34.71))\n .filterDate('2020-07-01', '2020-09-01')\n .select('B[4-5]')\n) # Get NIR and SWIR1 bands only.\nprint('Collection:', col.getInfo())\n\n# Convert the image collection to a single multi-band image. Note that image ID\n# ('system:index') is prepended to band names to delineate the source images.\nimg = col.toBands()\nprint('Collection to bands:', img.getInfo())\n\n# Band order is determined by collection order. Here, the collection is\n# sorted in descending order of the date of observation (reverse of previous).\nband_order = col.sort('DATE_ACQUIRED', False).toBands()\nprint('Customized band order:', band_order.getInfo())\n```"]]