Zeel commited on
Commit
e7b5fc1
1 Parent(s): 5c463e0

add one more RGB

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -149,6 +149,7 @@ def process_date(daterange, satellite, veg_indices):
149
  # Get median mosaic
150
  bucket["mosaic_visual_max_ndvi"] = collection.qualityMosaic("NDVI")
151
  bucket["mosaic_visual_median"] = collection.median()
 
152
 
153
  if satellite == "COPERNICUS/S2_SR_HARMONIZED":
154
  cloud_mask_probability = fc["features"][0]["properties"]["MSK_CLDPRB"] / 100
@@ -387,7 +388,7 @@ if "result" in st.session_state:
387
  m.add_child(colormap)
388
  m.to_streamlit()
389
 
390
- for name, key in zip(["RGB (Max NDVI Mosaic)", "RGB (Median Mosaic)"], ["mosaic_visual_max_ndvi", "mosaic_visual_median"]):
391
  st.write(f"<h3><div style='text-align: center;'>{name}</div></h3>", unsafe_allow_html=True)
392
  cols = st.columns(2)
393
  for col, daterange_str in zip(cols, [year_1, year_2]):
 
149
  # Get median mosaic
150
  bucket["mosaic_visual_max_ndvi"] = collection.qualityMosaic("NDVI")
151
  bucket["mosaic_visual_median"] = collection.median()
152
+ bucket["image_visual_least_cloud"] = collection.sort('CLOUDY_PIXEL_PERCENTAGE').first()
153
 
154
  if satellite == "COPERNICUS/S2_SR_HARMONIZED":
155
  cloud_mask_probability = fc["features"][0]["properties"]["MSK_CLDPRB"] / 100
 
388
  m.add_child(colormap)
389
  m.to_streamlit()
390
 
391
+ for name, key in zip(["RGB (Least Cloud Tile Crop)", "RGB (Max NDVI Mosaic)", "RGB (Median Mosaic)"], ["image_visual_least_cloud", "mosaic_visual_max_ndvi", "mosaic_visual_median"]):
392
  st.write(f"<h3><div style='text-align: center;'>{name}</div></h3>", unsafe_allow_html=True)
393
  cols = st.columns(2)
394
  for col, daterange_str in zip(cols, [year_1, year_2]):