ee.FeatureCollection.distinct

Koleksiyondaki yinelenen öğeleri kaldırır. Yinelenenlerin, seçilen özelliklerin serileştirilmiş biçimi üzerinde güçlü bir karma kullanılarak belirlendiğini unutmayın.

Kullanımİadeler
FeatureCollection.distinct(properties)FeatureCollection
Bağımsız DeğişkenTürAyrıntılar
bu: collectionFeatureCollectionNesnelerin seçileceği giriş koleksiyonu.
propertiesNesneKarşılaştırma için kullanılacak bir özellik adı veya özellik adları listesi. Nesne geometrilerini karşılaştırmak için ".geo" özelliği eklenebilir.

Örnekler

Kod Düzenleyici (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 kurulumu

Python API'si ve etkileşimli geliştirme için geemap kullanımı hakkında bilgi edinmek üzere Python Ortamı sayfasına bakın.

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