gee-community / geemap

A Python package for interactive geospatial analysis and visualization with Google Earth Engine.
https://geemap.org
MIT License
3.45k stars 1.08k forks source link

Sentinel 3 is showing different colors for 2021 data ( but in GEE explorer it looks correct) #834

Closed AbhiRathore closed 2 years ago

AbhiRathore commented 2 years ago

Hi,

Environment Information

Description

I wanted to extract data using 3 bands of Sentinel 3. I am using 'Oa01_radiance', 'Oa18_radiance', 'Oa19_radiance' and 'quality_flags' for bitquality based mask

I am getting absolutely correct images from 2017 to 2020 but suddenly in 2021 the color of the images has suspicious blue and black in it instead of yellow and orange

Please see 2 images I am attaching, one from 2020 and other 2021, in 2021 it is clearly visible that suddenly orange color changed into black but when I check same using EO Browser (https://apps.sentinel-hub.com/eo-browser/) than it was looking fine.

Attaching 3 screenshots 1) Image of 2020 for 21April2020 to 22 April 2020 , name : Image_2020_21April20_22April20 2) Image of 2021 for 21April2021 to 22 April 2021 , name : Image_2021_21April21_22April21 3) EO browser - for 21April2021 , name: Image_2021_21April21_EoBrowser

What I Did

lon = 69.1219 lat = 24.0264 startdate = '2021-04-21' daysdiff = 1 bufferarea = 40000 enddate = pd.to_datetime(startdate) + datetime.timedelta(days=daysdiff) extent = buffer_extent(lat, lon, 3857 , buffer_size=bufferarea) # ### 15 KM extent = as_geojson(extent,3857) aoi = reproject_geom(shape(extent['geometry']), 3857, 4326) xmin, ymin, xmax, ymax = [round(coord, 3) for coord in aoi.bounds] bbox = [xmin, ymin, xmax, ymax] gg = ee.Geometry.Rectangle(bbox) ########## Sentinel 3 OLCI img_col_sen3 = ee.ImageCollection('COPERNICUS/S3/OLCI') \ .filterDate(startdate, enddate)\ .select(['Oa01_radiance', 'Oa18_radiance', 'Oa19_radiance','quality_flags'])\ .min().multiply(ee.Image([0.0139465, 0.00549962, 0.00502847,1]))\ .multiply(ee.Image([1.5,1.5,1.5,1])); ######## Bright pixel mask def checkBit(image,bit): watermask = 1 << bit return image.bitwiseAnd(watermask) q = img_col_sen3.select('quality_flags') cloud = checkBit(q,27).eq(0) img_col_sen3_upd = img_col_sen3.updateMask(cloud) ########## Visualization visParams2 = {'min': 0,'max' : 1} Map = geemap.Map() Map.setCenter(lon,lat, zoom = 12) Map.addLayer(img_col_sen3_upd,visParams2, "custom") Map

########### Thanks in advance

Image_2020_21April20_22April20

Image_2021_21April21_22April21 Image_2021_21April21_EoBrowser

giswqs commented 2 years ago

I don't think this is a geemap issue. Did you try the GEE JavaScript Code Editor? If both GEE Code Editor and geemap are getting the same results, then the problem probably results from the data source (i.e., the image in the GEE Catalog, which might not always be the same as the original data source.)