In [1]:
import ee
ee.Initialize()

In [2]:
from geetools import tools

In [4]:
import ipygee as ui
import geedatasets

In [5]:
l8 = geedatasets.landsat.Landsat8SR()

In [6]:
col = l8.collection().limit(10)

Parametrize CLOUD_COVER from 0-100 to 0-1


In [7]:
parametrized = tools.imagecollection.parametrizeProperty(col, 'CLOUD_COVER', [0, 100], [0, 1])

In [8]:
cloud_cover = parametrized.toList(10).map(lambda img: ee.Image(img).get('CLOUD_COVER_PARAMETRIZED'))

In [9]:
ui.eprint(cloud_cover)


Values out of range


In [10]:
parametrized2 = tools.imagecollection.parametrizeProperty(col, 'CLOUD_COVER', [0, 80], [0, 1])

In [11]:
out_of_range = parametrized2.toList(10).map(lambda img: ee.Image(img).get('CLOUD_COVER_PARAMETRIZED'))

In [12]:
ui.eprint(out_of_range)



In [ ]: