UjjwalKGupta
commited on
Commit
•
c0d8523
1
Parent(s):
87b906b
Add ESRI map overlaid by DEM
Browse files
app.py
CHANGED
@@ -112,6 +112,8 @@ def add_geometry_to_maps(map_list):
|
|
112 |
def get_dem_slope_maps(buffer_ee_geometry):
|
113 |
# Create the map for DEM
|
114 |
dem_map = gee_folium.Map()
|
|
|
|
|
115 |
dem_layer = ee.Image("USGS/SRTMGL1_003").clip(buffer_ee_geometry)
|
116 |
|
117 |
# Generate contour lines using elevation thresholds
|
@@ -131,6 +133,8 @@ def get_dem_slope_maps(buffer_ee_geometry):
|
|
131 |
|
132 |
# Create the map for Slope
|
133 |
slope_map = gee_folium.Map()
|
|
|
|
|
134 |
# Calculate slope from the DEM
|
135 |
slope_layer = ee.Terrain.slope(ee.Image("USGS/SRTMGL1_003")).clip(buffer_ee_geometry).rename('slope')
|
136 |
# Calculate the minimum and maximum values
|
@@ -486,7 +490,6 @@ if "result" in st.session_state:
|
|
486 |
for col, param_map, title in zip(cols, [dem_map, slope_map], ["DEM Map", "Slope Map"]):
|
487 |
with col:
|
488 |
add_geometry_to_maps([param_map])
|
489 |
-
param_map.add_tile_layer(wayback_mapping[latest_date], name=f"Esri Wayback - {latest_date.replace('-', '/')}", attribution="Esri")
|
490 |
write_info(f"""
|
491 |
<div style="text-align: center;">
|
492 |
{title}
|
|
|
112 |
def get_dem_slope_maps(buffer_ee_geometry):
|
113 |
# Create the map for DEM
|
114 |
dem_map = gee_folium.Map()
|
115 |
+
dem_map.add_tile_layer(wayback_mapping[latest_date], name=f"Esri Wayback - {latest_date.replace('-', '/')}", attribution="Esri")
|
116 |
+
|
117 |
dem_layer = ee.Image("USGS/SRTMGL1_003").clip(buffer_ee_geometry)
|
118 |
|
119 |
# Generate contour lines using elevation thresholds
|
|
|
133 |
|
134 |
# Create the map for Slope
|
135 |
slope_map = gee_folium.Map()
|
136 |
+
slope_map.add_tile_layer(wayback_mapping[latest_date], name=f"Esri Wayback - {latest_date.replace('-', '/')}", attribution="Esri")
|
137 |
+
|
138 |
# Calculate slope from the DEM
|
139 |
slope_layer = ee.Terrain.slope(ee.Image("USGS/SRTMGL1_003")).clip(buffer_ee_geometry).rename('slope')
|
140 |
# Calculate the minimum and maximum values
|
|
|
490 |
for col, param_map, title in zip(cols, [dem_map, slope_map], ["DEM Map", "Slope Map"]):
|
491 |
with col:
|
492 |
add_geometry_to_maps([param_map])
|
|
|
493 |
write_info(f"""
|
494 |
<div style="text-align: center;">
|
495 |
{title}
|