ee.FeatureCollection.aggregate_max

รวบรวมพร็อพเพอร์ตี้ที่กำหนดของออบเจ็กต์ในคอลเล็กชัน โดยคำนวณค่าสูงสุดของค่าของพร็อพเพอร์ตี้ที่เลือก

การใช้งานการคืนสินค้า
FeatureCollection.aggregate_max(property)
อาร์กิวเมนต์ประเภทรายละเอียด
ดังนี้ collectionFeatureCollectionคอลเล็กชันที่จะรวบรวมข้อมูล
propertyสตริงพร็อพเพอร์ตี้ที่จะใช้จากแต่ละองค์ประกอบของคอลเล็กชัน

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

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

print('Max of power plant capacities (MW)',
      fc.aggregate_max('capacitymw'));  // 2910

การตั้งค่า 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('Max of power plant capacities (MW):',
      fc.aggregate_max('capacitymw').getInfo())  # 2910