Earth Engine introduit des
niveaux de quota non commerciaux pour protéger les ressources de calcul partagées et garantir des performances fiables pour tous. Tous les projets non commerciaux devront sélectionner un niveau de quota d'ici le
27 avril 2026, faute de quoi le niveau "Communauté" sera appliqué par défaut. Les quotas de niveau s'appliqueront à tous les projets (quelle que soit la date de sélection du niveau) à compter du
27 avril 2026.
En savoir plus
ee.Image.select
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Sélectionne des bandes à partir d'une image.
Renvoie une image avec les bandes sélectionnées.
| Utilisation | Renvoie |
|---|
Image.select(var_args) | Image |
| Argument | Type | Détails |
|---|
ceci : image | Image | Instance Image. |
var_args | VarArgs[Object] | Deux possibilités s'offrent à vous :
- N'importe quel nombre d'arguments non listés. Tous ces éléments seront interprétés comme des sélecteurs de bande. Il peut s'agir de noms de bandes, d'expressions régulières ou d'index numériques. Par exemple : selected = image.select('a', 'b', 3, 'd');
- Deux listes. La première sera utilisée comme sélecteur de bande et la seconde comme nouveau nom pour les bandes sélectionnées. Le nombre de nouveaux noms doit correspondre au nombre de groupes sélectionnés. Par exemple : selected = image.select(['a', 4], ['newA', 'newB']);
|
Exemples
Éditeur de code (JavaScript)
// A Sentinel-2 surface reflectance image.
var img = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG');
print('All band names', img.bandNames());
print('Select a band by name',
img.select('B11').bandNames());
print('Select a band by index',
img.select(10).bandNames());
print('Select bands using a list',
img.select(['B11', 'B8', 'B3']).bandNames());
print('Select bands by an argument series',
img.select('B11', 'B8', 'B3').bandNames());
print('Mixing string and integer selectors is valid',
img.select(10, 'B8', 2).bandNames());
print('Rename selected bands using two corresponding lists',
img.select(['B11', 'B8', 'B3'], ['SWIR1', 'NIR', 'Green']).bandNames());
// Use regular expressions to select bands.
print('Match "QA" followed by any two characters',
img.select('QA..').bandNames());
print('Match "B" followed by any character, any number of times',
img.select('B.*').bandNames());
print('Match "B" followed by any character, and any optional third character',
img.select('B..?').bandNames());
print('Match "B" followed by a character in the range 6-8',
img.select('B[6-8]').bandNames());
print('Match "B" followed by a character in the range 1-9 and then 1-2',
img.select('B[1-9][1-2]').bandNames());
print('Match "B" or "QA" each followed by any character, any number of times.',
img.select('B.*|QA.*').bandNames());
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 Sentinel-2 surface reflectance image.
img = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG')
display('All band names:', img.bandNames())
display('Select a band by name:', img.select('B11').bandNames())
display('Select a band by index:', img.select(10).bandNames())
display('Select bands using a list:',
img.select(['B11', 'B8', 'B3']).bandNames())
display('Select bands by an argument series:',
img.select('B11', 'B8', 'B3').bandNames())
display('Mixing string and integer selectors is valid:',
img.select(10, 'B8', 2).bandNames())
display('Rename selected bands using two corresponding lists:',
img.select(['B11', 'B8', 'B3'], ['SWIR1', 'NIR', 'Green'])
.bandNames())
# Use regular expressions to select bands.
display('Match "QA" followed by any two characters:',
img.select('QA..').bandNames())
display('Match "B" followed by any character, any number of times:',
img.select('B.*').bandNames())
display('Match "B" followed by any character, and any optional third character',
img.select('B..?').bandNames())
display('Match "B" followed by a character in the range 6-8',
img.select('B[6-8]').bandNames())
display('Match "B" followed by a character in the range 1-9 and then 1-2',
img.select('B[1-9][1-2]').bandNames())
display('Match "B" or "QA" each followed by any character, any number of times.',
img.select('B.*|QA.*').bandNames())
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 2026/01/08 (UTC).
[null,null,["Dernière mise à jour le 2026/01/08 (UTC)."],[],[]]