ee.ImageCollection.size

컬렉션에 있는 요소의 수를 반환합니다.

사용반환 값
ImageCollection.size()정수
인수유형세부정보
다음과 같은 경우: collectionFeatureCollection개수를 셀 컬렉션입니다.

코드 편집기 (JavaScript)

// Note: ee.ImageCollection.size may take a lot of time and memory to run,
// since it must generate all of the results in order to count them. Large
// collections and/or complex computations can produce memory limitation
// errors.

// A Landsat 8 TOA image collection (1 year 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-01-01', '2021-01-01');

// Get the number of images in the collection.
print('Number of images', col.size());

Python 설정

Python API 및 geemap를 사용한 대화형 개발에 관한 자세한 내용은 Python 환경 페이지를 참고하세요.

import ee
import geemap.core as geemap

Colab (Python)

# Note: ee.ImageCollection.size may take a lot of time and memory to run,
# since it must generate all of the results in order to count them. Large
# collections and/or complex computations can produce memory limitation
# errors.

# A Landsat 8 TOA image collection (1 year of images at a specific point).
col = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA').filterBounds(
    ee.Geometry.Point(-90.70, 34.71)
    ).filterDate('2020-01-01', '2021-01-01')

# Get the number of images in the collection.
print('Number of images', col.size().getInfo())