ee.FeatureCollection.aggregate_count_distinct
    
    
      
    
    
      
      با مجموعهها، منظم بمانید
    
    
      
      ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
  
  
بر روی یک ویژگی معین از اشیاء در یک مجموعه جمع می شود و تعداد مقادیر متمایز برای ویژگی انتخاب شده را محاسبه می کند.
| استفاده | برمی گرداند | | FeatureCollection. aggregate_count_distinct (property) | شماره | 
| استدلال | تایپ کنید | جزئیات | | این: collection | مجموعه ویژگی ها | مجموعه برای جمع آوری بیش از. | 
| property | رشته | ویژگی مورد استفاده از هر عنصر مجموعه. | 
 نمونه ها 
 ویرایشگر کد (جاوا اسکریپت) 
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');
print('Number of distinct power plant fuel sources',
      fc.aggregate_count_distinct('fuel1'));  // 7 راه اندازی پایتون
 برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap
 کولب (پایتون) 
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')
display('Number of distinct power plant fuel sources:',
        fc.aggregate_count_distinct('fuel1'))  # 7
  
  
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
  تاریخ آخرین بهروزرسانی 2025-10-30 بهوقت ساعت هماهنگ جهانی.
  
  
  
    
      [null,null,["تاریخ آخرین بهروزرسانی 2025-10-30 بهوقت ساعت هماهنگ جهانی."],[],["The `aggregate_count_distinct` method calculates the number of unique values for a specified property within a FeatureCollection. It takes a FeatureCollection as input and a property name (string) to evaluate. The method returns a numerical value representing the count of distinct values. For example, in a FeatureCollection of power plants, using `aggregate_count_distinct('fuel1')` returns the number of distinct fuel sources. In the provided example in Belgium it returned 7.\n"]]