Spaces:
Sleeping
Sleeping
Clipping image to BBox
Browse files- pages/05_GOES_NBR.py +6 -4
pages/05_GOES_NBR.py
CHANGED
@@ -3,6 +3,11 @@ import geemap
|
|
3 |
|
4 |
import solara
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
class Map(geemap.Map):
|
8 |
def __init__(self, **kwargs):
|
@@ -16,6 +21,7 @@ class Map(geemap.Map):
|
|
16 |
preNBR = PREgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR');
|
17 |
postNBR = POSTgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR');
|
18 |
dNBR = preNBR.subtract(postNBR).select('NBR')
|
|
|
19 |
|
20 |
dNBRvisParams = {
|
21 |
'min': 0.0,
|
@@ -24,10 +30,6 @@ class Map(geemap.Map):
|
|
24 |
|
25 |
self.addLayer(dNBR, dNBRvisParams, "GOES dNBR")
|
26 |
|
27 |
-
|
28 |
-
fireList = ["North Complex", "Dixie", "Cameron Peak", "August Complex"]
|
29 |
-
four_fires = solara.reactive([fireList[0]])
|
30 |
-
|
31 |
@solara.component
|
32 |
def Page():
|
33 |
solara.SelectMultiple("Wildfire Case Study", four_fires, fireList)
|
|
|
3 |
|
4 |
import solara
|
5 |
|
6 |
+
fireList = ["North Complex", "Dixie", "Cameron Peak", "August Complex"]
|
7 |
+
four_fires = solara.reactive([fireList[0]])
|
8 |
+
|
9 |
+
NorthComplexBB = ee.Geometry.BBox(-121.616097, 39.426723, -120.668526, 40.030845)
|
10 |
+
|
11 |
|
12 |
class Map(geemap.Map):
|
13 |
def __init__(self, **kwargs):
|
|
|
21 |
preNBR = PREgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR');
|
22 |
postNBR = POSTgoesCMI.select(['CMI_C03','CMI_C06']).normalizedDifference(['CMI_C03', 'CMI_C06']).toFloat().rename('NBR');
|
23 |
dNBR = preNBR.subtract(postNBR).select('NBR')
|
24 |
+
dNBRclipped = dNBR.clip(NorthComplexBB)
|
25 |
|
26 |
dNBRvisParams = {
|
27 |
'min': 0.0,
|
|
|
30 |
|
31 |
self.addLayer(dNBR, dNBRvisParams, "GOES dNBR")
|
32 |
|
|
|
|
|
|
|
|
|
33 |
@solara.component
|
34 |
def Page():
|
35 |
solara.SelectMultiple("Wildfire Case Study", four_fires, fireList)
|