إشعار : يجب
إثبات الأهلية للاستخدام غير التجاري لجميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إليها. إذا لم يتم تأكيد حسابك بحلول 26 سبتمبر 2025، قد يتم تعليق إمكانية الوصول إليه.
إرسال ملاحظات
ee.ImageCollection.select
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اختَر نطاقات من كل صورة في مجموعة.
تعرض هذه الطريقة مجموعة الصور مع النطاقات المحدّدة.
الاستخدام المرتجعات ImageCollection. select (selectors, names )
ImageCollection
الوسيطة النوع التفاصيل هذا: imagecollection
ImageCollection مثيل ImageCollection. selectors
List<Object> قائمة بالأسماء أو التعبيرات العادية أو الفهارس الرقمية التي تحدّد النطاقات المطلوب اختيارها. names
List<String>, اختياري قائمة بالأسماء الجديدة للنطاقات الناتجة. يجب أن يتطابق مع عدد النطاقات المحدّدة.
أمثلة
محرّر الرموز البرمجية (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 ());
إعداد Python
راجِع صفحة
بيئة Python للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام
geemap
للتطوير التفاعلي.
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 ())
إرسال ملاحظات
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0 . للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers . إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
هل تريد مشاركة ملاحظاتك معنا؟
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],["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"]]