Spaces:
Sleeping
Sleeping
fix multi-geometry issue
Browse files
app.py
CHANGED
@@ -70,11 +70,8 @@ else:
|
|
70 |
file_url = f"https://drive.google.com/uc?id={ID}"
|
71 |
|
72 |
input_gdf = preprocess_gdf(gpd.read_file(file_url))
|
73 |
-
if len(input_gdf)
|
74 |
-
st.
|
75 |
-
f"Expecting only one geometry per KML, but found {len(input_gdf)} geometries. Please fix the KML or provide another KML."
|
76 |
-
)
|
77 |
-
st.stop()
|
78 |
st.session_state.input_gdf = input_gdf
|
79 |
# st.toast("Data loaded and cached")
|
80 |
|
|
|
70 |
file_url = f"https://drive.google.com/uc?id={ID}"
|
71 |
|
72 |
input_gdf = preprocess_gdf(gpd.read_file(file_url))
|
73 |
+
if len(input_gdf) > 1:
|
74 |
+
st.warning(f"Only the first polygon in the KML will be processed; all other geometries will be ignored.")
|
|
|
|
|
|
|
75 |
st.session_state.input_gdf = input_gdf
|
76 |
# st.toast("Data loaded and cached")
|
77 |
|