ee.FeatureCollection.toList

컬렉션의 요소를 목록으로 반환합니다.

사용반환 값
FeatureCollection.toList(count, offset)목록
인수유형세부정보
다음과 같은 경우: collectionFeatureCollection가져올 입력 컬렉션입니다.
count정수가져올 최대 요소 수입니다.
offset정수, 기본값: 0시작부터 삭제할 요소의 수입니다. 설정된 경우 (오프셋 + 개수) 요소가 가져와지고 첫 번째 오프셋 요소는 삭제됩니다.

코드 편집기 (JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

print('First 5 features to an ee.List', fc.toList(5));

print('Second 5 features to an ee.List', fc.toList(5, 5));

Python 설정

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

import ee
import geemap.core as geemap

Colab (Python)

# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

print('First 5 features to an ee.List:', fc.toList(5).getInfo())

print('Second 5 features to an ee.List:', fc.toList(5, 5).getInfo())