Keep DEM ahead of Visual Comparison
Browse files
app.py
CHANGED
@@ -507,6 +507,23 @@ if "result" in st.session_state:
|
|
507 |
fig.update_layout(xaxis=dict(tickvals=df_numeric.index, ticktext=df_numeric.index))
|
508 |
st.plotly_chart(fig)
|
509 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
st.write(
|
511 |
"<h3><div style='text-align: center;'>Visual Comparison between Two Years</div></h3>", unsafe_allow_html=True
|
512 |
)
|
@@ -608,20 +625,4 @@ if "result" in st.session_state:
|
|
608 |
)
|
609 |
m.to_streamlit()
|
610 |
|
611 |
-
|
612 |
-
"<h3><div style='text-align: center;'>DEM and Slope from SRTM at 30m resolution</div></h3>",
|
613 |
-
unsafe_allow_html=True,
|
614 |
-
)
|
615 |
-
cols = st.columns(2)
|
616 |
-
dem_map, slope_map = get_dem_slope_maps(ee.Geometry(geometry_gdf.to_crs(4326).geometry.item().__geo_interface__))
|
617 |
-
for col, param_map, title in zip(cols, [dem_map, slope_map], ["DEM Map", "Slope Map"]):
|
618 |
-
with col:
|
619 |
-
param_map.add_gdf(
|
620 |
-
geometry_gdf,
|
621 |
-
layer_name="Geometry",
|
622 |
-
style_function=lambda x: {"color": "blue", "fillOpacity": 0.0, "fillColor": "blue"},
|
623 |
-
)
|
624 |
-
write_info(f"""<div style="text-align: center;">{title}</div>""")
|
625 |
-
param_map.addLayerControl()
|
626 |
-
|
627 |
-
param_map.to_streamlit()
|
|
|
507 |
fig.update_layout(xaxis=dict(tickvals=df_numeric.index, ticktext=df_numeric.index))
|
508 |
st.plotly_chart(fig)
|
509 |
|
510 |
+
st.write(
|
511 |
+
"<h3><div style='text-align: center;'>DEM and Slope from SRTM at 30m resolution</div></h3>",
|
512 |
+
unsafe_allow_html=True,
|
513 |
+
)
|
514 |
+
cols = st.columns(2)
|
515 |
+
dem_map, slope_map = get_dem_slope_maps(ee.Geometry(geometry_gdf.to_crs(4326).geometry.item().__geo_interface__))
|
516 |
+
for col, param_map, title in zip(cols, [dem_map, slope_map], ["DEM Map", "Slope Map"]):
|
517 |
+
with col:
|
518 |
+
param_map.add_gdf(
|
519 |
+
geometry_gdf,
|
520 |
+
layer_name="Geometry",
|
521 |
+
style_function=lambda x: {"color": "blue", "fillOpacity": 0.0, "fillColor": "blue"},
|
522 |
+
)
|
523 |
+
write_info(f"""<div style="text-align: center;">{title}</div>""")
|
524 |
+
param_map.addLayerControl()
|
525 |
+
param_map.to_streamlit()
|
526 |
+
|
527 |
st.write(
|
528 |
"<h3><div style='text-align: center;'>Visual Comparison between Two Years</div></h3>", unsafe_allow_html=True
|
529 |
)
|
|
|
625 |
)
|
626 |
m.to_streamlit()
|
627 |
|
628 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|