In [1]:
import ee
ee.Initialize()
In [2]:
from geetools import tools
In [3]:
import ipygee as ui
In [4]:
i = ee.Image('COPERNICUS/S2/20181122T142749_20181122T143353_T18GYT').select('B.')
In [5]:
ui.eprint(i.bandNames())
In [6]:
removed = tools.image.removeBands(i, ['B1', 'B2', 'B7'])
In [7]:
ui.eprint(removed.bandNames())
In [8]:
col = ee.ImageCollection('COPERNICUS/S2').limit(5)
In [9]:
def print_bands(col):
info = col.getInfo()
images = info['features']
for image in images:
bands = image['bands']
print([band['id'] for band in bands])
In [10]:
print_bands(col)
In [11]:
removed_col = col.map(lambda img: tools.image.removeBands(img, ['B1', 'B2', 'B7']))
In [12]:
print_bands(removed_col)
In [ ]: