Earth Engine در حال معرفی
سطوح سهمیهبندی غیرتجاری برای محافظت از منابع محاسباتی مشترک و تضمین عملکرد قابل اعتماد برای همه است. همه پروژههای غیرتجاری باید تا
۲۷ آوریل ۲۰۲۶ یک سطح سهمیهبندی را انتخاب کنند یا به طور پیشفرض از سطح Community استفاده خواهند کرد. سهمیهبندی سطوح برای همه پروژهها (صرف نظر از تاریخ انتخاب سطح) در
۲۷ آوریل ۲۰۲۶ اعمال خواهد شد.
اطلاعات بیشتر.
ee.ImageCollection.select
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
باندها را از هر تصویر در یک مجموعه انتخاب کنید.
مجموعه تصاویر را با باندهای انتخاب شده برمیگرداند.
| کاربرد | بازگشتها | ImageCollection. select (selectors, names ) | مجموعه تصاویر |
| استدلال | نوع | جزئیات | این: imagecollection | مجموعه تصاویر | نمونهی ImageCollection. |
selectors | فهرست[شیء] | فهرستی از نامها، عبارات منظم یا شاخصهای عددی که باندهای مورد نظر برای انتخاب را مشخص میکنند. |
names | لیست[رشته]، اختیاری | فهرستی از نامهای جدید برای باندهای خروجی. باید با تعداد باندهای انتخاب شده مطابقت داشته باشد. |
مثالها
ویرایشگر کد (جاوااسکریپت)
// 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()); تنظیمات پایتون
برای اطلاعات بیشتر در مورد API پایتون و استفاده از geemap برای توسعه تعاملی، به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap
کولب (پایتون)
# 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())
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2026-01-08 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2026-01-08 بهوقت ساعت هماهنگ جهانی."],[],["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"]]