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 للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام geemap للتطوير التفاعلي.

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