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