Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ from io import BytesIO
|
|
11 |
import fiona
|
12 |
from shapely import wkb
|
13 |
from shapely.ops import transform
|
|
|
14 |
|
15 |
|
16 |
# Enable fiona driver
|
@@ -187,7 +188,6 @@ if uploaded_file is not None:
|
|
187 |
st.line_chart(resultant_df[['AvgNDVI_Inside', 'Avg_NDVI_Buffer', 'Date']].set_index('Date'))
|
188 |
|
189 |
# Visualize map on ESRI basemap
|
190 |
-
# Set the title of the app
|
191 |
st.write("Map Visualization")
|
192 |
|
193 |
# Create a Leafmap object
|
@@ -195,7 +195,7 @@ if uploaded_file is not None:
|
|
195 |
|
196 |
# Add ESRI latest imagery basemap and polygon
|
197 |
m.add_basemap("ESRI/WorldImagery")
|
198 |
-
m.add_polygon(gdf.iloc[0].geometry, "Polygon
|
199 |
|
200 |
# Display the map
|
201 |
m.to_streamlit(height=600)
|
|
|
11 |
import fiona
|
12 |
from shapely import wkb
|
13 |
from shapely.ops import transform
|
14 |
+
import leafmap
|
15 |
|
16 |
|
17 |
# Enable fiona driver
|
|
|
188 |
st.line_chart(resultant_df[['AvgNDVI_Inside', 'Avg_NDVI_Buffer', 'Date']].set_index('Date'))
|
189 |
|
190 |
# Visualize map on ESRI basemap
|
|
|
191 |
st.write("Map Visualization")
|
192 |
|
193 |
# Create a Leafmap object
|
|
|
195 |
|
196 |
# Add ESRI latest imagery basemap and polygon
|
197 |
m.add_basemap("ESRI/WorldImagery")
|
198 |
+
m.add_polygon(gdf.iloc[0].geometry, "Polygon", color="red", fill_opacity=0.5)
|
199 |
|
200 |
# Display the map
|
201 |
m.to_streamlit(height=600)
|