Annonce : Tous les projets non commerciaux enregistrés pour utiliser Earth Engine avant le 
15 avril 2025 devront 
vérifier leur éligibilité non commerciale pour conserver leur accès. Si vous ne validez pas votre statut avant le 26 septembre 2025, votre accès pourra être suspendu.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.ImageCollection.getString
    
    
      
    
    
      
      Restez organisé à l'aide des collections
    
    
      
      Enregistrez et classez les contenus selon vos préférences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
Extrayez une propriété d'une entité.
| Utilisation | Renvoie | 
|---|
| ImageCollection.getString(property) | Chaîne | 
| Argument | Type | Détails | 
|---|
| ceci : object | Élément | Fonctionnalité à partir de laquelle extraire la propriété. | 
| property | Chaîne | Propriété à extraire. | 
  
  
  Exemples
  
    
  
  
    
    
  
  
  
  
    
    
    
      Éditeur de code (JavaScript)
    
    
  // A contrived, empty image collection for simple demonstration.
var col = ee.ImageCollection([]);
print('Collection without properties', col);
// Set collection properties using a dictionary.
col = col.set({
  project_name: 'biomass_tracking',
  project_id: 3,
  plot_ids: ee.Array([7, 11, 20])
});
// Set collection properties using a series of key-value pairs.
col = col.set('project_year', 2018,
              'rgb_vis', 'false_color');
print('Collection with properties', col);
// Get a dictionary of collection property keys and values.
print('Property keys and values (ee.Dictionary)', col.toDictionary());
// Get the value of a collection property. To use the result of
// ee.ImageCollection.get in further computation, you need to cast it to the
// appropriate class, for example, ee.Number(result) or ee.String(result).
print('Project ID (ambiguous object)', col.get('project_id'));
// Get the value of a string collection property as an ee.String object.
print('Project name (ee.String)', col.getString('project_name'));
// Get the value of a numeric collection property as an ee.Number object.
print('Project year (ee.Number)', col.getNumber('project_year'));
// Get the value of an ee.Array collection property as an ee.Array object.
print('Plot IDs (ee.Array)', col.getArray('plot_ids'));
  
    
  
  
    
  
  
  
  
    
  
    
  Configuration de Python
  Consultez la page 
    Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.
  import ee
import geemap.core as geemap
  
    
    
      Colab (Python)
    
    
  # A contrived, empty image collection for simple demonstration.
col = ee.ImageCollection([])
display('Collection without properties:', col)
# Set collection properties using a dictionary.
col = col.set({
    'project_name': 'biomass_tracking',
    'project_id': 3,
    'plot_ids': ee.Array([7, 11, 20])
})
# Set collection properties using a series of key-value pairs.
col = col.set('project_year', 2018,
              'rgb_vis', 'false_color')
display('Collection with properties:', col)
# Get a dictionary of collection property keys and values.
display('Property keys and values (ee.Dictionary):', col.toDictionary())
# Get the value of a collection property. To use the result of
# ee.ImageCollection.get in further computation, you need to cast it to the
# appropriate class, for example, ee.Number(result) or ee.String(result).
display('Project ID (ambiguous object):', col.get('project_id'))
# Get the value of a string collection property as an ee.String object.
display('Project name (ee.String):', col.getString('project_name'))
# Get the value of a numeric collection property as an ee.Number object.
display('Project year (ee.Number):', col.getNumber('project_year'))
# Get the value of an ee.Array collection property as an ee.Array object.
display('Plot IDs (ee.Array):', col.getArray('plot_ids'))
  
  
  
  
  
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
  Dernière mise à jour le 2025/10/30 (UTC).
  
  
  
    
      [null,null,["Dernière mise à jour le 2025/10/30 (UTC)."],[],["This content demonstrates extracting properties from an `ImageCollection` in Earth Engine. Users can set properties using dictionaries or key-value pairs. The `get()` method retrieves a property's value, but it needs casting (e.g., `ee.Number`, `ee.String`) for computation. Specialized methods like `getString()`, `getNumber()`, and `getArray()` retrieve values as their respective data types.  `toDictionary()` returns a dictionary of all properties.\n"]]