Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added cloud_score+ #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added cloud_score+ #48

wants to merge 1 commit into from

Conversation

Spiruel
Copy link

@Spiruel Spiruel commented Nov 7, 2023

A new cloud mask has been added to GEE. It'd be great to get this added to ee_extra, and therefore eemont.

This makes use of .linkCollection() which is available in the latest version of earthengine-api ('0.1.377'). I was unsure whether it was worth editing the cloud_prob code to use this new method as well. I've left it alone for now.

Here's some code to compare cloud_prob to cloud_score+:

"""#cloud score.ipynb

import geemap

import eemont
import ee

#ee.Authenticate()
ee.Initialize()

col = ee.ImageCollection('COPERNICUS/S2_SR')

S2 = ee.ImageCollection('COPERNICUS/S2_SR')

point = ee.Geometry.Point(-2.82,54.04)

date = '2023-04-01'
prob = 50

img = S2.filterBounds(point).closest(date).maskClouds(method='cloud_prob', prob=prob)

img2 = S2.filterBounds(point).closest(date).maskClouds(method='cloud_score+', prob=prob)

viz = {'bands':['B4','B3','B2'], 'min':0,'max':5000}

Map = geemap.Map(center=(54.04,-2.82), zoom=12, height=600)

cloud_prob = geemap.ee_tile_layer(img, viz, 'cloud_prob')
cloud_score = geemap.ee_tile_layer(img2, viz, 'cloud_score+')
Map.split_map(cloud_prob, cloud_score)

Map.add_text(f'cloud_prob {prob}%', position='topleft')
Map.add_text(f'cloud_score+ {prob}%', position='topright')
Map

@davemlz, @csaybar, @aazuspan @KMarkert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant