I'm trying to get the Snow Cover extent from Sentinel-2 imagery using GEE. Here is my script: https://code.earthengine.google.com/1fbe39044e73c262fe935db00dc2adb3
The script performs the following:
- Create a Cloud Mask (expression based on S2 bands)
- Calculate the NDSI (expression based on S2 bands)
- Add Sentinel-2 imagery and sort them chronologically.
- Use mosaic.() to create a mosaic with the most recent images
- Create a Snow Cover Extent layer (expression based on the above created bands)
The problem is when I visualize the results I get strange values for pixels in the image overlap areas. The visualized values are different from the band values (used Inspector to check). For example, the white (cloud) strip at the right side of the image (see script) have a value of 1 (cloud) which is correct but the visualization is wrong (should be in red).
Even stranger, when I zoom in and out the visualization colors change!!
This makes me doubt what the mosaic () method really does. I thought only the most recent image is used.
can someone please look at the code and help me figure out what is going on ?
Thanks