Spaces:
Sleeping
Sleeping
Carl Boettiger
commited on
Commit
•
431fd88
1
Parent(s):
e35caba
test
Browse files
app.py
CHANGED
@@ -211,11 +211,13 @@ if polygon is not None:
|
|
211 |
|
212 |
m2 = leafmap.Map(center=[35, -110], zoom=6)
|
213 |
|
214 |
-
#
|
|
|
215 |
|
216 |
# write first and last date to tif
|
|
|
217 |
nbs.isel(time=0).rio.to_raster(raster_path="static/before.tif", driver="COG")
|
218 |
nbs.isel(time=(nbs.time.size-1)).rio.to_raster(raster_path="static/after.tif", driver="COG")
|
219 |
-
m2.split_map("
|
220 |
m2.to_streamlit()
|
221 |
|
|
|
211 |
|
212 |
m2 = leafmap.Map(center=[35, -110], zoom=6)
|
213 |
|
214 |
+
# doesn't work
|
215 |
+
# m2.add_raster(nbs.isel(time=0), colormap="terrain", layer_name="NBR") # empty?
|
216 |
|
217 |
# write first and last date to tif
|
218 |
+
|
219 |
nbs.isel(time=0).rio.to_raster(raster_path="static/before.tif", driver="COG")
|
220 |
nbs.isel(time=(nbs.time.size-1)).rio.to_raster(raster_path="static/after.tif", driver="COG")
|
221 |
+
m2.split_map("static/before.tif", "static/after.tif", left_label = "NBR before fire", right_label = "NBR after fire")
|
222 |
m2.to_streamlit()
|
223 |
|