ee.FeatureCollection.distinct

यह फ़ंक्शन, किसी कलेक्शन से डुप्लीकेट वैल्यू हटाता है. ध्यान दें कि डुप्लीकेट का पता लगाने के लिए, चुनी गई प्रॉपर्टी के क्रमबद्ध फ़ॉर्म पर मज़बूत हैश का इस्तेमाल किया जाता है.

इस्तेमालरिटर्न
FeatureCollection.distinct(properties)FeatureCollection
आर्ग्यूमेंटटाइपविवरण
यह: collectionFeatureCollectionवह इनपुट कलेक्शन जिससे ऑब्जेक्ट चुने जाएंगे.
propertiesऑब्जेक्टतुलना के लिए इस्तेमाल की जाने वाली प्रॉपर्टी का नाम या प्रॉपर्टी के नामों की सूची. ऑब्जेक्ट की ज्यामिति की तुलना करने के लिए, '.geo' प्रॉपर्टी को शामिल किया जा सकता है.

उदाहरण

कोड एडिटर (JavaScript)

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

// Remove duplicate features according to property values.
print('Distinct based on a single property', fc.distinct('fuel1'));
print('Distinct based on two properties', fc.distinct(['fuel1', 'source']));
print('Distinct based on geometry', fc.distinct('.geo'));

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('FeatureCollection of power plants in Belgium:', fc.getInfo())

# Remove duplicate features according to property values.
print('Distinct based on a single property:', fc.distinct('fuel1').getInfo())
print('Distinct based on two properties:',
      fc.distinct(['fuel1', 'source']).getInfo())
print('Distinct based on geometry', fc.distinct('.geo').getInfo())