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.Image.select
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Seleziona le bande di un'immagine.
Restituisce un'immagine con le bande selezionate.
| Utilizzo | Restituisce |
|---|
Image.select(var_args) | Immagine |
| Argomento | Tipo | Dettagli |
|---|
questo: image | Immagine | L'istanza Image. |
var_args | VarArgs[Object] | Una delle due possibilità:
- Qualsiasi numero di argomenti non di elenco. Tutti questi valori verranno interpretati come selettori di banda. Possono essere nomi di bande, espressioni regolari o indici numerici. Ad esempio, selected = image.select('a', 'b', 3, 'd');
- Due liste. Il primo verrà utilizzato come selettore di bande e il secondo come nuovo nome per le bande selezionate. Il numero di nuovi nomi deve corrispondere al numero di bande selezionate. Ad esempio, selected = image.select(['a', 4], ['newA', 'newB']);
|
Esempi
Editor di codice (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());
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.
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())
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."],[],[]]