O Earth Engine introduziu
níveis de cota não comercial para proteger recursos de computação compartilhados e garantir um desempenho confiável para todo mundo. Os projetos não comerciais usam o nível da comunidade por padrão, mas é possível mudar o nível de um projeto a qualquer momento.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.Image.select
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Seleciona bandas de uma imagem.
Retorna uma imagem com as bandas selecionadas.
| Uso | Retorna |
|---|
Image.select(var_args) | Imagem |
| Argumento | Tipo | Detalhes |
|---|
isto: image | Imagem | A instância de imagem. |
var_args | VarArgs[Object] | Uma das duas possibilidades:
- Qualquer número de argumentos que não sejam de lista. Todos eles serão interpretados como seletores de banda. Podem ser nomes de bandas, expressões regulares ou índices numéricos. Por exemplo: selected = image.select('a', 'b', 3, 'd');
- Duas listas. O primeiro será usado como seletor de bandas, e o segundo como novos nomes para as bandas selecionadas. O número de novos nomes precisa corresponder ao número de bandas selecionadas. Por exemplo, selected = image.select(['a', 4], ['newA', 'newB']);
|
Exemplos
Editor de código (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());
Configuração do Python
Consulte a página
Ambiente Python (em inglês) para informações sobre a API Python e como usar
geemap para desenvolvimento interativo.
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())
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2026-01-08 UTC.
[null,null,["Última atualização 2026-01-08 UTC."],[],[]]