Add decode_url
Browse files
app.py
CHANGED
|
@@ -390,7 +390,8 @@ def calculate_geometry_metrics(file_url: str):
|
|
| 390 |
found, and returns the results in JSON format.
|
| 391 |
"""
|
| 392 |
try:
|
| 393 |
-
|
|
|
|
| 394 |
input_gdf = preprocess_gdf(input_gdf)
|
| 395 |
geometry_gdf = next((input_gdf.iloc[[i]] for i in range(len(input_gdf)) if is_valid_polygon(input_gdf.iloc[[i]])), None)
|
| 396 |
geometry_gdf = to_best_crs(geometry_gdf)
|
|
|
|
| 390 |
found, and returns the results in JSON format.
|
| 391 |
"""
|
| 392 |
try:
|
| 393 |
+
decoded_url = unquote(file_url)
|
| 394 |
+
input_gdf = get_gdf_from_url(decoded_url)
|
| 395 |
input_gdf = preprocess_gdf(input_gdf)
|
| 396 |
geometry_gdf = next((input_gdf.iloc[[i]] for i in range(len(input_gdf)) if is_valid_polygon(input_gdf.iloc[[i]])), None)
|
| 397 |
geometry_gdf = to_best_crs(geometry_gdf)
|