Spaces:
Running
on
L4
Running
on
L4
mikonvergence
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,7 @@ instructions_bottom = '''
|
|
27 |
|
28 |
image_data = solara.reactive(Image.new('RGB',(1068,1068)))
|
29 |
center = solara.reactive((20, 0))
|
|
|
30 |
zoom= solara.reactive(4)
|
31 |
s2_level = solara.reactive('L2A')
|
32 |
|
@@ -50,9 +51,9 @@ def Page():
|
|
50 |
solara.Markdown(instructions_bottom)
|
51 |
|
52 |
def update_image():
|
53 |
-
ret = map_to_image(m, return_centre=True, l2a=(s2_level.value=='L2A'))
|
54 |
if ret is not None:
|
55 |
-
image_data.value, center.value = ret
|
56 |
zoom.value=12
|
57 |
else:
|
58 |
image_data.value = Image.new('RGB',(1068,1068))
|
@@ -83,4 +84,10 @@ def Page():
|
|
83 |
solara.Select(label="Processing Level", value=s2_level, values=['L2A','L1C'], on_value=update_level)
|
84 |
with solara.Column(align='center'):
|
85 |
output = solara.Image(image_data.value)
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
|
|
27 |
|
28 |
image_data = solara.reactive(Image.new('RGB',(1068,1068)))
|
29 |
center = solara.reactive((20, 0))
|
30 |
+
gridcell = solara.reactive('')
|
31 |
zoom= solara.reactive(4)
|
32 |
s2_level = solara.reactive('L2A')
|
33 |
|
|
|
51 |
solara.Markdown(instructions_bottom)
|
52 |
|
53 |
def update_image():
|
54 |
+
ret = map_to_image(m, return_centre=True, return_gridcell=True, l2a=(s2_level.value=='L2A'))
|
55 |
if ret is not None:
|
56 |
+
image_data.value, center.value, gridcell.value = ret
|
57 |
zoom.value=12
|
58 |
else:
|
59 |
image_data.value = Image.new('RGB',(1068,1068))
|
|
|
84 |
solara.Select(label="Processing Level", value=s2_level, values=['L2A','L1C'], on_value=update_level)
|
85 |
with solara.Column(align='center'):
|
86 |
output = solara.Image(image_data.value)
|
87 |
+
solara.Markdown('''
|
88 |
+
| | |
|
89 |
+
|--------------------:|:----:|
|
90 |
+
| Latitude, Longitude | {:.3f}, {:.3f} |
|
91 |
+
| MajorTOM Grid | {} |
|
92 |
+
'''.format(center.value[0], center.value[1], gridcell.value))
|
93 |
|