ee.FeatureCollection.aggregate_first

تجميع البيانات حول سمة معيّنة للعناصر في مجموعة، مع احتساب قيمة السمة للعنصر الأول في المجموعة

الاستخدامالمرتجعات
FeatureCollection.aggregate_first(property)
الوسيطةالنوعالتفاصيل
هذا: collectionFeatureCollectionالمجموعة المطلوب تجميعها.
propertyسلسلةالسمة التي سيتم استخدامها من كل عنصر في المجموعة

أمثلة

محرّر الرموز البرمجية (JavaScript)

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

print('Fuel source for first power plant in the collection',
      fc.aggregate_first('fuel1'));  // Wind

إعداد 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('Fuel source for first power plant in the collection:',
      fc.aggregate_first('fuel1').getInfo())  # Wind