ee.Image.rename

किसी इमेज के बैंड का नाम बदलना.

बदली गई इमेज दिखाता है.

इस्तेमालरिटर्न
Image.rename(var_args)इमेज
आर्ग्यूमेंटटाइपविवरण
यह: imageइमेजइमेज का इंस्टेंस.
var_argsList<String>|Object|VarArgs<String>बैंड के नए नाम. यह संख्या, इमेज में मौजूद बैंड की संख्या से मेल खानी चाहिए.

उदाहरण

कोड एडिटर (JavaScript)

// 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());

Python सेटअप

Python API के बारे में जानकारी पाने और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

# A Sentinel-2 surface reflectance image.
img = ee.Image(
    'COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG'
).select(['B11', 'B8', 'B3'])
print('Original selected S2 image band names:', img.bandNames().getInfo())

print('Rename bands using a list (Python list or ee.List):',
      img.rename(['SWIR1', 'NIR', 'GREEN']).bandNames().getInfo())

print('Rename bands using a series of string arguments:',
      img.rename('swir1', 'nir', 'green').bandNames().getInfo())