Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def calculate_flow_direction(dtm_file):
|
|
| 8 |
elevation_array = cv2.imread(dtm_file.name, cv2.IMREAD_GRAYSCALE).astype(float)
|
| 9 |
|
| 10 |
# Step 2: Compute the slope and aspect of each cell in the DTM
|
| 11 |
-
cell_size =
|
| 12 |
dx = dy = cell_size
|
| 13 |
|
| 14 |
# Compute the x and y gradient values
|
|
@@ -75,7 +75,7 @@ iface = gr.Interface(
|
|
| 75 |
inputs="file",
|
| 76 |
outputs=["image", "image"],
|
| 77 |
title="DTM Flow Direction and Accumulation Calculator",
|
| 78 |
-
description="This app calculates the flow direction and accumulation maps for a digital terrain model (DTM)
|
| 79 |
)
|
| 80 |
|
| 81 |
# Launch the interface
|
|
|
|
| 8 |
elevation_array = cv2.imread(dtm_file.name, cv2.IMREAD_GRAYSCALE).astype(float)
|
| 9 |
|
| 10 |
# Step 2: Compute the slope and aspect of each cell in the DTM
|
| 11 |
+
cell_size = 0.2 # Set the cell size in meters
|
| 12 |
dx = dy = cell_size
|
| 13 |
|
| 14 |
# Compute the x and y gradient values
|
|
|
|
| 75 |
inputs="file",
|
| 76 |
outputs=["image", "image"],
|
| 77 |
title="DTM Flow Direction and Accumulation Calculator",
|
| 78 |
+
description="This app calculates the flow direction and accumulation maps for a digital terrain model (DTM).",
|
| 79 |
)
|
| 80 |
|
| 81 |
# Launch the interface
|