Anuncio : Todos los proyectos no comerciales registrados para usar Earth Engine antes del
15 de abril de 2025 deben
verificar su elegibilidad no comercial para mantener el acceso. Si no realizas la verificación antes del 26 de septiembre de 2025, es posible que se suspenda tu acceso.
Enviar comentarios
ee.ImageCollection.select
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Selecciona bandas de cada imagen de una colección.
Devuelve la colección de imágenes con las bandas seleccionadas.
Uso Muestra ImageCollection. select (selectors, names )
ImageCollection
Argumento Tipo Detalles esta: imagecollection
ImageCollection Instancia de ImageCollection. selectors
List<Object> Es una lista de nombres, expresiones regulares o índices numéricos que especifican las bandas que se seleccionarán. names
List<String>, opcional Es una lista de nombres nuevos para las bandas de salida. Debe coincidir con la cantidad de bandas seleccionadas.
Ejemplos
Editor de código (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 ());
Configuración de Python
Consulta la página
Entorno de Python para obtener información sobre la API de Python y el uso de geemap
para el desarrollo interactivo.
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' )
print ( 'All band names' , col . first () . bandNames () . getInfo ())
print ( 'Select a band by name:' ,
col . select ( 'B11' ) . first () . bandNames () . getInfo ())
print ( 'Select a band by index:' ,
col . select ( 10 ) . first () . bandNames () . getInfo ())
print ( 'Select bands using a list:' ,
col . select ([ 'B11' , 'B8' , 'B3' ]) . first () . bandNames () . getInfo ())
print ( 'Select bands by an argument series:' ,
col . select ( 'B11' , 'B8' , 'B3' ) . first () . bandNames () . getInfo ())
print ( 'Mixing string and integer selectors is valid:' ,
col . select ( 10 , 'B8' , 2 ) . first () . bandNames () . getInfo ())
print ( 'Rename selected bands using two corresponding lists:' ,
col . select ([ 'B11' , 'B8' , 'B3' ], [ 'SWIR1' , 'NIR' , 'Green' ])
. first () . bandNames () . getInfo ())
# Use regular expressions to select bands.
print ( 'Match "QA" followed by any two characters:' ,
col . select ( 'QA..' ) . first () . bandNames () . getInfo ())
print ( 'Match "B" followed by any character, any number of times:' ,
col . select ( 'B.*' ) . first () . bandNames () . getInfo ())
print ( 'Match "B" followed by any character, and any optional third character:' ,
col . select ( 'B..?' ) . first () . bandNames () . getInfo ())
print ( 'Match "B" followed by a character in the range 6-8:' ,
col . select ( 'B[6-8]' ) . first () . bandNames () . getInfo ())
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 () . getInfo ())
print ( 'Match "B" or "QA" each followed by any character, any number of times:' ,
col . select ( 'B.*|QA.*' ) . first () . bandNames () . getInfo ())
Enviar comentarios
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons , y los ejemplos de código están sujetos a la licencia Apache 2.0 . Para obtener más información, consulta las políticas del sitio de Google Developers . Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
¿Quieres brindar más información?
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-25 (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"]]