Spaces:
Sleeping
Sleeping
Added fading effect #33
Browse files- apps/rois.py +9 -0
- apps/timelapse.py +14 -1
apps/rois.py
CHANGED
@@ -103,6 +103,15 @@ landsat_rois = {
|
|
103 |
[-74.279938, -8.600032],
|
104 |
]
|
105 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
modis_rois = {
|
|
|
103 |
[-74.279938, -8.600032],
|
104 |
]
|
105 |
),
|
106 |
+
"Sierra Gorda, Chile": Polygon(
|
107 |
+
[
|
108 |
+
[-69.315491, -22.837104],
|
109 |
+
[-69.315491, -22.751488],
|
110 |
+
[-69.190006, -22.751488],
|
111 |
+
[-69.190006, -22.837104],
|
112 |
+
[-69.315491, -22.837104],
|
113 |
+
]
|
114 |
+
),
|
115 |
}
|
116 |
|
117 |
modis_rois = {
|
apps/timelapse.py
CHANGED
@@ -514,6 +514,7 @@ def app():
|
|
514 |
["arial.ttf", "alibaba.otf"],
|
515 |
index=0,
|
516 |
)
|
|
|
517 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
518 |
|
519 |
empty_text = st.empty()
|
@@ -569,6 +570,7 @@ def app():
|
|
569 |
progress_bar_height=5,
|
570 |
loop=0,
|
571 |
mp4=mp4,
|
|
|
572 |
)
|
573 |
elif collection == "Sentinel-2 MSI Surface Reflectance":
|
574 |
out_gif = geemap.sentinel2_timelapse(
|
@@ -601,6 +603,7 @@ def app():
|
|
601 |
progress_bar_height=5,
|
602 |
loop=0,
|
603 |
mp4=mp4,
|
|
|
604 |
)
|
605 |
except:
|
606 |
empty_text.error(
|
@@ -699,6 +702,7 @@ def app():
|
|
699 |
)
|
700 |
font_size = st.slider("Font size:", 10, 50, 20)
|
701 |
font_color = st.color_picker("Font color:", "#ffffff")
|
|
|
702 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
703 |
|
704 |
empty_text = st.empty()
|
@@ -740,6 +744,7 @@ def app():
|
|
740 |
overlay_width=overlay_width,
|
741 |
overlay_opacity=overlay_opacity,
|
742 |
mp4=mp4,
|
|
|
743 |
)
|
744 |
|
745 |
if out_gif is not None and os.path.exists(out_gif):
|
@@ -825,6 +830,7 @@ def app():
|
|
825 |
["arial.ttf", "alibaba.otf"],
|
826 |
index=0,
|
827 |
)
|
|
|
828 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
829 |
|
830 |
empty_text = st.empty()
|
@@ -855,6 +861,7 @@ def app():
|
|
855 |
overlay_width=overlay_width,
|
856 |
overlay_opacity=overlay_opacity,
|
857 |
mp4=mp4,
|
|
|
858 |
)
|
859 |
|
860 |
geemap.reduce_gif_size(out_gif)
|
@@ -926,6 +933,7 @@ def app():
|
|
926 |
["arial.ttf", "alibaba.otf"],
|
927 |
index=0,
|
928 |
)
|
|
|
929 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
930 |
|
931 |
empty_text = st.empty()
|
@@ -981,6 +989,7 @@ def app():
|
|
981 |
progress_bar_height=5,
|
982 |
loop=0,
|
983 |
mp4=mp4,
|
|
|
984 |
)
|
985 |
except:
|
986 |
empty_text.error(
|
@@ -1051,7 +1060,7 @@ def app():
|
|
1051 |
colorbar_label = st.text_input(
|
1052 |
"Enter the colorbar label:", "Surface Temperature (°C)"
|
1053 |
)
|
1054 |
-
|
1055 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
1056 |
|
1057 |
empty_text = st.empty()
|
@@ -1112,6 +1121,7 @@ def app():
|
|
1112 |
colorbar_label=colorbar_label,
|
1113 |
loop=0,
|
1114 |
mp4=mp4,
|
|
|
1115 |
)
|
1116 |
elif collection == "MODIS Ocean Color SMI":
|
1117 |
if vis_params.startswith("{") and vis_params.endswith(
|
@@ -1154,6 +1164,7 @@ def app():
|
|
1154 |
colorbar_label=colorbar_label,
|
1155 |
loop=0,
|
1156 |
mp4=mp4,
|
|
|
1157 |
)
|
1158 |
except:
|
1159 |
empty_text.error(
|
@@ -1214,6 +1225,7 @@ def app():
|
|
1214 |
["arial.ttf", "alibaba.otf"],
|
1215 |
index=0,
|
1216 |
)
|
|
|
1217 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
1218 |
|
1219 |
empty_text = st.empty()
|
@@ -1265,6 +1277,7 @@ def app():
|
|
1265 |
progress_bar_height=5,
|
1266 |
loop=0,
|
1267 |
mp4=mp4,
|
|
|
1268 |
)
|
1269 |
except:
|
1270 |
empty_text.error(
|
|
|
514 |
["arial.ttf", "alibaba.otf"],
|
515 |
index=0,
|
516 |
)
|
517 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
518 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
519 |
|
520 |
empty_text = st.empty()
|
|
|
570 |
progress_bar_height=5,
|
571 |
loop=0,
|
572 |
mp4=mp4,
|
573 |
+
fading=fading,
|
574 |
)
|
575 |
elif collection == "Sentinel-2 MSI Surface Reflectance":
|
576 |
out_gif = geemap.sentinel2_timelapse(
|
|
|
603 |
progress_bar_height=5,
|
604 |
loop=0,
|
605 |
mp4=mp4,
|
606 |
+
fading=fading,
|
607 |
)
|
608 |
except:
|
609 |
empty_text.error(
|
|
|
702 |
)
|
703 |
font_size = st.slider("Font size:", 10, 50, 20)
|
704 |
font_color = st.color_picker("Font color:", "#ffffff")
|
705 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
706 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
707 |
|
708 |
empty_text = st.empty()
|
|
|
744 |
overlay_width=overlay_width,
|
745 |
overlay_opacity=overlay_opacity,
|
746 |
mp4=mp4,
|
747 |
+
fading=fading,
|
748 |
)
|
749 |
|
750 |
if out_gif is not None and os.path.exists(out_gif):
|
|
|
830 |
["arial.ttf", "alibaba.otf"],
|
831 |
index=0,
|
832 |
)
|
833 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
834 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
835 |
|
836 |
empty_text = st.empty()
|
|
|
861 |
overlay_width=overlay_width,
|
862 |
overlay_opacity=overlay_opacity,
|
863 |
mp4=mp4,
|
864 |
+
fading=fading,
|
865 |
)
|
866 |
|
867 |
geemap.reduce_gif_size(out_gif)
|
|
|
933 |
["arial.ttf", "alibaba.otf"],
|
934 |
index=0,
|
935 |
)
|
936 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
937 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
938 |
|
939 |
empty_text = st.empty()
|
|
|
989 |
progress_bar_height=5,
|
990 |
loop=0,
|
991 |
mp4=mp4,
|
992 |
+
fading=fading,
|
993 |
)
|
994 |
except:
|
995 |
empty_text.error(
|
|
|
1060 |
colorbar_label = st.text_input(
|
1061 |
"Enter the colorbar label:", "Surface Temperature (°C)"
|
1062 |
)
|
1063 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
1064 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
1065 |
|
1066 |
empty_text = st.empty()
|
|
|
1121 |
colorbar_label=colorbar_label,
|
1122 |
loop=0,
|
1123 |
mp4=mp4,
|
1124 |
+
fading=fading,
|
1125 |
)
|
1126 |
elif collection == "MODIS Ocean Color SMI":
|
1127 |
if vis_params.startswith("{") and vis_params.endswith(
|
|
|
1164 |
colorbar_label=colorbar_label,
|
1165 |
loop=0,
|
1166 |
mp4=mp4,
|
1167 |
+
fading=fading,
|
1168 |
)
|
1169 |
except:
|
1170 |
empty_text.error(
|
|
|
1225 |
["arial.ttf", "alibaba.otf"],
|
1226 |
index=0,
|
1227 |
)
|
1228 |
+
fading = st.slider("Fading duration (seconds) for each frame:", 0.0, 3.0, 0.0)
|
1229 |
mp4 = st.checkbox("Save timelapse as MP4", True)
|
1230 |
|
1231 |
empty_text = st.empty()
|
|
|
1277 |
progress_bar_height=5,
|
1278 |
loop=0,
|
1279 |
mp4=mp4,
|
1280 |
+
fading=fading,
|
1281 |
)
|
1282 |
except:
|
1283 |
empty_text.error(
|