1

I succeed to remove cloud from these step in :

https://developers.google.com/earth-engine/tutorials/community/sentinel-2-s2cloudless

Then I download the result. But, the result is not in decimal as reflectance value. It is float64. While in the statement in the website : This tutorial is an introduction to masking clouds and cloud shadows in Sentinel-2 (S2) surface reflectance (SR) data using Earth Engine.

I download using this code :

# download part of band
task = ee.batch.Export.image.toDrive(
  image=s2_sr_median.select('B3')
  description='2019_3',
  folder='ee_demos',
  region=region,
  scale=10,
  crs='EPSG:4326'
  )
task.start()

You can see in the drive : https://drive.google.com/drive/folders/1Rx0_nTelEMeUp-YSfhsRDnXeWN0dcMMA?usp=sharing. Am I mistake in writing the code to download reflectance value of sentinel-2 cloud removal?

1 Answer 1

2

I think the scale factor is missing. According to the documentation, a scale 0.0001 needs to be applied. From this segment of the tutorial, it is clear that the scale factor is not applied. The following code is supposed to work.

s2_sr_median = (s2_sr_cld_col.map(add_cld_shdw_mask)
                             .map(apply_cld_shdw_mask)
                             .median().divide(10000))
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.