सूचना: जिन गैर-व्यावसायिक प्रोजेक्ट के लिए Earth Engine को 
15 अप्रैल, 2025 से पहले रजिस्टर किया गया है उन्हें ऐक्सेस बनाए रखने के लिए, 
गैर-व्यावसायिक इस्तेमाल से जुड़ी ज़रूरी शर्तों की पुष्टि करनी होगी. अगर आपने 26 सितंबर, 2025 तक पुष्टि नहीं की, तो आपके ऐक्सेस को होल्ड पर रखा जा सकता है.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.FeatureCollection.cluster
    
    
      
    
    
      
      संग्रह की मदद से व्यवस्थित रहें
    
    
      
      अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
यह फ़ंक्शन, कलेक्शन में मौजूद हर सुविधा को क्लस्टर करता है. साथ ही, हर सुविधा में एक नया कॉलम जोड़ता है. इस कॉलम में, उस क्लस्टर का नंबर होता है जिसे सुविधा असाइन की गई है.
| इस्तेमाल | रिटर्न | 
|---|
| FeatureCollection.cluster(clusterer, outputName) | FeatureCollection | 
| आर्ग्यूमेंट | टाइप | विवरण | 
|---|
| यह: features | FeatureCollection | क्लस्टर करने के लिए सुविधाओं का कलेक्शन. हर सुविधा में, क्लस्टरर के स्कीमा की सभी प्रॉपर्टी शामिल होनी चाहिए. | 
| clusterer | क्लस्टरर | इस्तेमाल किया जाने वाला क्लस्टरर. | 
| outputName | स्ट्रिंग, डिफ़ॉल्ट: "cluster" | जोड़ी जाने वाली आउटपुट प्रॉपर्टी का नाम. | 
  
  
  उदाहरण
  
    
  
  
    
    
  
  
  
  
    
    
    
      कोड एडिटर (JavaScript)
    
    
  // Import a Sentinel-2 surface reflectance image.
var image = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG');
// Get the image geometry to define the geographical bounds of a point sample.
var imageBounds = image.geometry();
// Sample the image at a set of random points; a feature collection is returned.
var pointSampleFc = image.sample(
    {region: imageBounds, scale: 20, numPixels: 1000, geometries: true});
// Instantiate a k-means clusterer and train it.
var clusterer = ee.Clusterer.wekaKMeans(5).train(pointSampleFc);
// Cluster the input using the trained clusterer; optionally specify the name
// of the output cluster ID property.
var clusteredFc = pointSampleFc.cluster(clusterer, 'spectral_cluster');
print('Note added "spectral_cluster" property for an example feature',
      clusteredFc.first().toDictionary());
// Visualize the clusters by applying a unique color to each cluster ID.
var palette = ee.List(['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3']);
var clusterVis = clusteredFc.map(function(feature) {
  return feature.set('style', {
    color: palette.get(feature.get('spectral_cluster')),
  });
}).style({styleProperty: 'style'});
// Display the points colored by cluster ID with the S2 image.
Map.setCenter(-122.35, 37.47, 9);
Map.addLayer(image, {bands: ['B4', 'B3', 'B2'], min: 0, max: 1500}, 'S2 image');
Map.addLayer(clusterVis, null, 'Clusters');
  
    
  
  
    
  
  
  
  
    
  
    
  Python सेटअप करना
  Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, 
    Python एनवायरमेंट पेज देखें.
  import ee
import geemap.core as geemap
  
    
    
      Colab (Python)
    
    
  # Import a Sentinel-2 surface reflectance image.
image = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG')
# Get the image geometry to define the geographical bounds of a point sample.
image_bounds = image.geometry()
# Sample the image at a set of random points a feature collection is returned.
point_sample_fc = image.sample(
    region=image_bounds, scale=20, numPixels=1000, geometries=True
)
# Instantiate a k-means clusterer and train it.
clusterer = ee.Clusterer.wekaKMeans(5).train(point_sample_fc)
# Cluster the input using the trained clusterer optionally specify the name
# of the output cluster ID property.
clustered_fc = point_sample_fc.cluster(clusterer, 'spectral_cluster')
display(
    'Note added "spectral_cluster" property for an example feature',
    clustered_fc.first().toDictionary(),
)
# Visualize the clusters by applying a unique color to each cluster ID.
palette = ee.List(['8dd3c7', 'ffffb3', 'bebada', 'fb8072', '80b1d3'])
cluster_vis = clustered_fc.map(
    lambda feature: feature.set(
        'style', {'color': palette.get(feature.get('spectral_cluster'))}
    )
).style(styleProperty='style')
# Display the points colored by cluster ID with the S2 image.
m = geemap.Map()
m.set_center(-122.35, 37.47, 9)
m.add_layer(
    image, {'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 1500}, 'S2 image'
)
m.add_layer(cluster_vis, None, 'Clusters')
m
  
  
  
  
  
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
  आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
  
  
  
    
      [null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[]]