ee.FeatureCollection.aggregate_product

تُجمِّع هذه الدالة القيم في سمة معيّنة للعناصر في مجموعة، وتحسب ناتج قيم السمة المحدّدة.

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

أمثلة

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

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

print('Product of power plant capacities (MW)',
      fc.aggregate_product('capacitymw'));  // 2.149198109e+109

إعداد 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('Product of power plant capacities (MW):',
      fc.aggregate_product('capacitymw').getInfo())  # 2.149198109e+109