Earth Engine memperkenalkan
tingkatan kuota nonkomersial untuk mengamankan resource komputasi bersama dan memastikan performa yang andal bagi semua orang. Semua project nonkomersial harus memilih tingkat kuota paling lambat
27 April 2026 atau akan menggunakan Tingkat Komunitas secara default. Kuota tingkat akan berlaku untuk semua project (terlepas dari tanggal pemilihan tingkat) pada
27 April 2026.
Pelajari lebih lanjut.
ee.ImageCollection.select
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pilih rentang dari setiap gambar dalam koleksi.
Menampilkan koleksi gambar dengan band yang dipilih.
| Penggunaan | Hasil |
|---|
ImageCollection.select(selectors, names) | ImageCollection |
| Argumen | Jenis | Detail |
|---|
ini: imagecollection | ImageCollection | Instance ImageCollection. |
selectors | List[Object] | Daftar nama, ekspresi reguler, atau indeks numerik yang menentukan band yang akan dipilih. |
names | List[String], opsional | Daftar nama baru untuk band output. Harus cocok dengan jumlah rentang yang dipilih. |
Contoh
Editor Kode (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());
Penyiapan Python
Baca halaman
Lingkungan Python untuk mengetahui informasi tentang Python API dan penggunaan
geemap untuk pengembangan interaktif.
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())
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2026-01-08 UTC.
[null,null,["Terakhir diperbarui pada 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"]]