ee.Image.rename
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
باندهای یک تصویر را تغییر نام دهید.
تصویر تغییر نام یافته را برمی گرداند.
| استفاده | برمی گرداند | Image. rename (var_args) | تصویر |
| استدلال | تایپ کنید | جزئیات | این: image | تصویر | نمونه تصویر. |
var_args | List<String>|Object|VarArgs<String> | نام های جدید گروه ها باید با تعداد باندهای تصویر مطابقت داشته باشد. |
نمونه ها
ویرایشگر کد (جاوا اسکریپت)
// A Sentinel-2 surface reflectance image.
var img = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG')
.select(['B11', 'B8', 'B3']);
print('Original selected S2 image band names', img.bandNames());
print('Rename bands using a list (JavaScript array or ee.List)',
img.rename(['SWIR1', 'NIR', 'GREEN']).bandNames());
print('Rename bands using a series of string arguments',
img.rename('swir1', 'nir', 'green').bandNames()); راه اندازی پایتون
برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap
کولب (پایتون)
# A Sentinel-2 surface reflectance image.
img = ee.Image(
'COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG'
).select(['B11', 'B8', 'B3'])
display('Original selected S2 image band names:', img.bandNames())
display('Rename bands using a list (Python list or ee.List):',
img.rename(['SWIR1', 'NIR', 'GREEN']).bandNames())
display('Rename bands using a series of string arguments:',
img.rename('swir1', 'nir', 'green').bandNames())
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-10-30 بهوقت ساعت هماهنگ جهانی."],[],["The core functionality is to rename the bands of an image using the `Image.rename()` method. This method takes either a list or a series of string arguments as new band names. The number of new names provided must match the existing number of bands. The method returns the image with the updated band names. Examples demonstrate renaming bands of a Sentinel-2 image in both JavaScript and Python, using both a list and individual string arguments.\n"]]