Earth Engine sta introducendo
livelli di quota non commerciali per salvaguardare le risorse di calcolo condivise e garantire prestazioni affidabili per tutti. Tutti i progetti non commerciali dovranno selezionare un livello di quota entro il
27 aprile 2026, altrimenti verrà utilizzato il livello Community per impostazione predefinita. Le quote di livello entreranno in vigore per tutti i progetti (indipendentemente dalla data di selezione del livello) il
27 aprile 2026.
Scopri di più.
ee.ImageCollection.select
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Seleziona le bande di ciascuna immagine di una raccolta.
Restituisce la raccolta di immagini con le bande selezionate.
| Utilizzo | Resi |
|---|
ImageCollection.select(selectors, names) | ImageCollection |
| Argomento | Tipo | Dettagli |
|---|
questo: imagecollection | ImageCollection | L'istanza ImageCollection. |
selectors | List[Object] | Un elenco di nomi, espressioni regolari o indici numerici che specificano le bande da selezionare. |
names | List[String], facoltativo | Un elenco di nuovi nomi per le bande di output. Deve corrispondere al numero di bande selezionate. |
Esempi
Editor di codice (JavaScript)
// A Sentinel-2 surface reflectance image collection.
var col = ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(ee.Geometry.Point(-122.152, 37.336))
.filterDate('2021-01-01', '2021-02-01');
print('All band names', col.first().bandNames());
print('Select a band by name',
col.select('B11').first().bandNames());
print('Select a band by index',
col.select(10).first().bandNames());
print('Select bands using a list',
col.select(['B11', 'B8', 'B3']).first().bandNames());
print('Select bands by an argument series',
col.select('B11', 'B8', 'B3').first().bandNames());
print('Mixing string and integer selectors is valid',
col.select(10, 'B8', 2).first().bandNames());
print('Rename selected bands using two corresponding lists',
col.select(['B11', 'B8', 'B3'], ['SWIR1', 'NIR', 'Green'])
.first().bandNames());
// Use regular expressions to select bands.
print('Match "QA" followed by any two characters',
col.select('QA..').first().bandNames());
print('Match "B" followed by any character, any number of times',
col.select('B.*').first().bandNames());
print('Match "B" followed by any character, and any optional third character',
col.select('B..?').first().bandNames());
print('Match "B" followed by a character in the range 6-8',
col.select('B[6-8]').first().bandNames());
print('Match "B" followed by a character in the range 1-9 and then 1-2',
col.select('B[1-9][1-2]').first().bandNames());
print('Match "B" or "QA" each followed by any character, any number of times.',
col.select('B.*|QA.*').first().bandNames());
Configurazione di Python
Consulta la pagina
Ambiente Python per informazioni sull'API Python e sull'utilizzo di
geemap per lo sviluppo interattivo.
import ee
import geemap.core as geemap
Colab (Python)
# A Sentinel-2 surface reflectance image collection.
col = ee.ImageCollection('COPERNICUS/S2_SR').filterBounds(
ee.Geometry.Point(-122.152, 37.336)
).filterDate('2021-01-01', '2021-02-01')
display('All band names', col.first().bandNames())
display('Select a band by name:',
col.select('B11').first().bandNames())
display('Select a band by index:',
col.select(10).first().bandNames())
display('Select bands using a list:',
col.select(['B11', 'B8', 'B3']).first().bandNames())
display('Select bands by an argument series:',
col.select('B11', 'B8', 'B3').first().bandNames())
display('Mixing string and integer selectors is valid:',
col.select(10, 'B8', 2).first().bandNames())
display('Rename selected bands using two corresponding lists:',
col.select(['B11', 'B8', 'B3'], ['SWIR1', 'NIR', 'Green'])
.first().bandNames())
# Use regular expressions to select bands.
display('Match "QA" followed by any two characters:',
col.select('QA..').first().bandNames())
display('Match "B" followed by any character, any number of times:',
col.select('B.*').first().bandNames())
display('Match "B" followed by any character, and any optional third character:',
col.select('B..?').first().bandNames())
display('Match "B" followed by a character in the range 6-8:',
col.select('B[6-8]').first().bandNames())
display('Match "B" followed by a character in the range 1-9 and then 1-2:',
col.select('B[1-9][1-2]').first().bandNames())
display('Match "B" or "QA" each followed by any character, any number of times:',
col.select('B.*|QA.*').first().bandNames())
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2026-01-08 UTC.
[null,null,["Ultimo aggiornamento 2026-01-08 UTC."],[],["The `select` method extracts specific bands from an ImageCollection, returning a new ImageCollection with those bands. Band selection can be done by name, index, or a list of these. New band names can be assigned using an optional list, which must match the number of selected bands. Regular expressions can also be used to select bands based on pattern matching. The code examples demonstrate these selection techniques for both JavaScript and Python.\n"]]