ee.FeatureCollection.union

تدمج هذه الدالة جميع الأشكال الهندسية في مجموعة معيّنة في شكل هندسي واحد وتعرض مجموعة تحتوي على عنصر واحد فقط يتضمّن المعرّف union_result وشكلاً هندسيًا.

الاستخدامالمرتجعات
FeatureCollection.union(maxError)FeatureCollection
الوسيطةالنوعالتفاصيل
هذا: collectionFeatureCollectionالمجموعة التي سيتم دمجها
maxErrorErrorMargin، القيمة التلقائية: nullالحدّ الأقصى للخطأ المسموح به عند إجراء أي عمليات إعادة إسقاط ضرورية. إذا لم يتم تحديدها، يتم ضبط القيمة التلقائية على هامش الخطأ المطلوب من الناتج.

أمثلة

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

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

print('Original FeatureCollection', fc);

// Merge all geometries into one. A FeatureCollection with a single feature
// with no properties is returned.
print('All geometries merged into one', fc.union(1));

إعداد 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('Original FeatureCollection:', fc.getInfo())

# Merge all geometries into one. A FeatureCollection with a single feature
# with no properties is returned.
print('All geometries merged into one:', fc.union(1).getInfo())