ee.FeatureCollection.toList

: コレクションの要素をリストとして返します。

用途戻り値
FeatureCollection.toList(count, offset)リスト
引数タイプ詳細
これ: collectionFeatureCollection取得する入力コレクション。
countInteger取得する要素の最大数。
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())