I am looking for percentage of cloud cover in my study region from landsat images. Here is the code I have got so far:
def cloudcover(image):
value = image.get("CLOUD_COVER_LAND")
return image.addBands(value)
collection = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2') \
.map(cloudcover) \
.select("CLOUD_COVER_LAND") \
.filterBounds(polygon)
listOfPoints = ee.FeatureCollection(points)
col_med = collection.median()
#extract values
geemap.extract_values_to_points(listOfPoints, col_med, out_csv, scale= 30, crs = 'EPSG:4326')
But I keep getting this error:
EEException: reduce.median: Error in map(ID=LC08_166053_20180115): Image.addBands: Parameter 'srcImg' is required.