Spaces:
Runtime error
Runtime error
Update pag/add_field.py
Browse files- pag/add_field.py +4 -2
pag/add_field.py
CHANGED
@@ -15,6 +15,8 @@ from pyproj import Transformer
|
|
15 |
from shapely.ops import transform
|
16 |
from geopy.geocoders import Nominatim
|
17 |
from streamlit_folium import folium_static
|
|
|
|
|
18 |
|
19 |
def check_authentication():
|
20 |
if not check_password():
|
@@ -186,9 +188,9 @@ def check_polygon_area_within_range(active_drawing, min_area_km2=1, max_area_km2
|
|
186 |
st.warning(f"Field area {area_km2} is less than {min_area_km2} km2. Please draw again!")
|
187 |
return False
|
188 |
if area_km2 > max_area_km2:
|
189 |
-
st.warning(f"Field area {
|
190 |
return False
|
191 |
-
st.success(f"Field area is {
|
192 |
|
193 |
return True
|
194 |
|
|
|
15 |
from shapely.ops import transform
|
16 |
from geopy.geocoders import Nominatim
|
17 |
from streamlit_folium import folium_static
|
18 |
+
from shapely.ops import transform
|
19 |
+
from geopy.geocoders import Nominatim
|
20 |
|
21 |
def check_authentication():
|
22 |
if not check_password():
|
|
|
188 |
st.warning(f"Field area {area_km2} is less than {min_area_km2} km2. Please draw again!")
|
189 |
return False
|
190 |
if area_km2 > max_area_km2:
|
191 |
+
st.warning(f"Field area {area_km2} is more than {max_area_km2} km2. Please draw again!")
|
192 |
return False
|
193 |
+
st.success(f"Field area is {area_km2} km2, now give it a unique name {st.session_state['current_user']} !")
|
194 |
|
195 |
return True
|
196 |
|