ee.FeatureCollection.toList

Menampilkan elemen koleksi sebagai daftar.

PenggunaanHasil
FeatureCollection.toList(count, offset)Daftar
ArgumenJenisDetail
ini: collectionFeatureCollectionKoleksi input yang akan diambil.
countBilangan BulatJumlah maksimum elemen yang akan diambil.
offsetBilangan bulat, default: 0Jumlah elemen yang akan dihapus dari awal. Jika disetel, (offset + count) elemen akan diambil dan elemen offset pertama akan dihapus.

Contoh

Code Editor (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));

Penyiapan Python

Lihat halaman Lingkungan Python untuk mengetahui informasi tentang Python API dan penggunaan geemap untuk pengembangan interaktif.

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())