הודעה: כל הפרויקטים הלא מסחריים שנרשמו לשימוש ב-Earth Engine לפני 
15 באפריל 2025 חייבים 
לאמת את הזכאות לשימוש לא מסחרי כדי לשמור על הגישה. אם לא תאמתו את החשבון עד 26 בספטמבר 2025, יכול להיות שהגישה שלכם תושעה.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.FeatureCollection.reduceColumns
    
    
      
    
    
      
      קל לארגן דפים בעזרת אוספים
    
    
      
      אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
החלת פונקציית צמצום על כל רכיב באוסף, באמצעות בוררים נתונים שקובעים את נתוני הקלט.
הפונקציה מחזירה מילון של תוצאות, עם שמות הפלט כמפתחות.
| שימוש | החזרות | 
|---|
| FeatureCollection.reduceColumns(reducer, selectors, weightSelectors) | מילון | 
| ארגומנט | סוג | פרטים | 
|---|
| זה: collection | FeatureCollection | האוסף לצבירה. | 
| reducer | הפחתה | הפונקציה לצמצום שרוצים להחיל. | 
| selectors | רשימה | בורר לכל קלט של פונקציית ה-reducer. | 
| weightSelectors | רשימה, ברירת מחדל: null | בורר לכל קלט משוקלל של הפונקציה לצמצום. | 
  
  
  דוגמאות
  
    
  
  
    
    
  
  
  
  
    
    
    
      עורך הקוד (JavaScript)
    
    
  // FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
            .filter('country_lg == "Belgium"');
// Calculate mean of a single FeatureCollection property.
var propMean = fc.reduceColumns({
  reducer: ee.Reducer.mean(),
  selectors: ['gwh_estimt']
});
print('Mean of a single property', propMean);
// Calculate mean of multiple FeatureCollection properties.
var propsMean = fc.reduceColumns({
  reducer: ee.Reducer.mean().repeat(2),
  selectors: ['gwh_estimt', 'capacitymw']
});
print('Mean of multiple properties', propsMean);
// Calculate weighted mean of a single FeatureCollection property. Add a fuel
// source weight property to the FeatureCollection.
var fuelWeights = ee.Dictionary({
  Wind: 0.9,
  Gas: 0.2,
  Oil: 0.2,
  Coal: 0.1,
  Hydro: 0.7,
  Biomass: 0.5,
  Nuclear: 0.3
});
fc = fc.map(function(feature) {
  return feature.set('weight', fuelWeights.getNumber(feature.get('fuel1')));
});
var weightedMean = fc.reduceColumns({
  reducer: ee.Reducer.mean(),
  selectors: ['gwh_estimt'],
  weightSelectors: ['weight']
});
print('Weighted mean of a single property', weightedMean);
  
    
  
  
    
  
  
  
  
    
  
    
  הגדרת Python
  מידע על Python API ועל שימוש ב-geemap לפיתוח אינטראקטיבי מופיע בדף 
    Python Environment.
  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"')
# Calculate mean of a single FeatureCollection property.
prop_mean = fc.reduceColumns(**{
    'reducer': ee.Reducer.mean(),
    'selectors': ['gwh_estimt']
    })
display('Mean of a single property:', prop_mean)
# Calculate mean of multiple FeatureCollection properties.
props_mean = fc.reduceColumns(**{
    'reducer': ee.Reducer.mean().repeat(2),
    'selectors': ['gwh_estimt', 'capacitymw']
    })
display('Mean of multiple properties:', props_mean)
# Calculate weighted mean of a single FeatureCollection property. Add a fuel
# source weight property to the FeatureCollection.
def get_fuel(feature):
  return feature.set('weight', fuel_weights.getNumber(feature.get('fuel1')))
fuel_weights = ee.Dictionary({
    'Wind': 0.9,
    'Gas': 0.2,
    'Oil': 0.2,
    'Coal': 0.1,
    'Hydro': 0.7,
    'Biomass': 0.5,
    'Nuclear': 0.3
    })
fc = fc.map(get_fuel)
weighted_mean = fc.reduceColumns(**{
    'reducer': ee.Reducer.mean(),
    'selectors': ['gwh_estimt'],
    'weightSelectors': ['weight']
    })
display('Weighted mean of a single property:', weighted_mean)
  
  
  
  
  
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
  עדכון אחרון: 2025-10-30 (שעון UTC).
  
  
  
    
      [null,null,["עדכון אחרון: 2025-10-30 (שעון UTC)."],[],["The `reduceColumns` function applies a reducer to a FeatureCollection, generating a dictionary of results. It uses `selectors` to specify input properties and can use `weightSelectors` for weighted inputs. The function takes a `reducer`, and a list of `selectors` and `weightSelectors`.  This method can calculate means of single or multiple properties and weighted means by using a reducer and specifying properties to calculate on. The results are returned as a dictionary.\n"]]