UjjwalKGupta
commited on
Commit
•
85fe8d3
1
Parent(s):
bc64de4
Update app.py
Browse files
app.py
CHANGED
@@ -115,11 +115,12 @@ def get_dem_slope_maps(buffer_ee_geometry):
|
|
115 |
dem_layer = ee.Image("USGS/SRTMGL1_003").clip(buffer_ee_geometry)
|
116 |
|
117 |
# Generate contour lines using elevation thresholds
|
|
|
118 |
contour_interval = 10
|
119 |
contours = terrain.select('elevation').subtract(terrain.select('elevation').mod(contour_interval)).rename('contours')
|
120 |
|
121 |
# Calculate the minimum and maximum values
|
122 |
-
stats =
|
123 |
|
124 |
# Print the results
|
125 |
max_value = stats.get('contours_max').getInfo()
|
|
|
115 |
dem_layer = ee.Image("USGS/SRTMGL1_003").clip(buffer_ee_geometry)
|
116 |
|
117 |
# Generate contour lines using elevation thresholds
|
118 |
+
terrain = ee.Algorithms.Terrain(dem_layer)
|
119 |
contour_interval = 10
|
120 |
contours = terrain.select('elevation').subtract(terrain.select('elevation').mod(contour_interval)).rename('contours')
|
121 |
|
122 |
# Calculate the minimum and maximum values
|
123 |
+
stats = contours.reduceRegion(reducer=ee.Reducer.minMax(),scale=30,maxPixels=1e13)
|
124 |
|
125 |
# Print the results
|
126 |
max_value = stats.get('contours_max').getInfo()
|