File size: 5,768 Bytes
d033501
 
 
19b905a
d033501
 
3e78c48
d033501
19b905a
 
 
d033501
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
"""Home page for Streamlit app."""
import streamlit as st
from src.config_parameters import config
from src.utils_layout import add_about, add_logo, toggle_menu_button

# Page configuration
st.set_page_config(layout="wide", page_title=config["browser_title"])

# If app is deployed hide menu button
toggle_menu_button()

# Create sidebar
add_logo("app/img/MA-logo.png")
add_about()

# Set fontisize text
st.markdown(
    """
    <style> p { font-size: %s; } </style>
    """
    % config["docs_fontsize"],
    unsafe_allow_html=True,
)

# Page title
st.markdown("# Home")

# First section
st.markdown("## Introduction")
st.markdown(
    """
    This tool allows to estimate flood extent using Sentinel-1
    synthetic-aperture radar
    <a href='%s'>SAR</a> data.<br><br>
    The methodology is based on a <a href=
    '%s'>recommended practice</a>
    published by the United Nations Platform for Space-based Information for
    Disaster Management and Emergency Response (UN-SPIDER) and it uses several
    satellite imagery datasets to produce the final output. The datasets are
    retrieved from <a href='%s'>Google Earth
    Engine</a> which is a powerful web-platform for cloud-based processing of
    remote sensing data on large scales. More information on the methodology is
    given in the Description.<br><br>
    This analysis provides a comprehensive overview of a flooding event, across
    different areas of interest, from settlements to countries. However, as
    mentioned in the UN-SPIDER website, the methodology is meant for broad
    information provision in a global context, and contains inherent
    uncertainties. Therefore, it is important that the tool is not used as the
    only source of information for rescue response planning.
    """
    % (
        config["url_sentinel_esa"],
        config["url_unspider_tutorial"],
        config["url_gee"],
    ),
    unsafe_allow_html=True,
)

# Second section
st.markdown("## How to use the tool")
st.markdown(
    """
    <ul>
        <li><p>
            In the sidebar, choose <i>Flood extent analysis</i> to start the
            analysis.
        </p>
        <li><p>
            In the left panel, use the drawing tool to select an area of
            interest on the map. You can delete your selection by clicking on
            the bin icon. While the flood mapping is generated regardless of
            the size of the selected region, you will be able to save raster
            and vector flooding extent only if the side of the rectangular
            selection does not exceed 100 km.
        </p>
        <li><p>
            In the right panel click on the title <i>Choose Image Dates</i>
            in order to expand the section. Here you need to select four dates.
            The first two identify a range of dates based on which the
            reference imagery (before the flooding event) is defined. You can
            select even years worth of data (the reference imagery is
            calculated as the median between the range of observations), but
            make sure you take into account wet and dry seasons if only taking
            a few months. The last two refer to a period of time which comes
            after the flooding event. By setting periods, not single dates, you
            allow the selection of enough tiles to cover the area of interest.
            Sentinel-1 imagery is acquired minimum every 12 days for each point
            on the globe (see Figure 2 in the documentation).
        </p>
        <li>
            <p>
                By clicking on <i>Choose parameters</i>, you will be able to
                set two variables:
            </p>
            <ul>
                <li><p>
                    The <i>threshold</i> is the value against which the
                    difference the two satellite images - before and after the
                    flooding event - is tested. Lower thresholds result in a
                    greater area considered "flooded". It is recommended to set
                    the value to 1.25, which was selected through trial and
                    error. You may want to adjust the value in case of high
                    rates of false positive or negative values, especially in
                    case other sources of information are available and it is
                    possible to compare flood extent estimations between
                    sources.
                </p>
                <li><p>
                    The <i>pass direction</i> has to do with the way the
                    satellite travels around the Earth. Depending on your area
                    of interest and time period, you may find more imagery
                    available for either the <i>Ascending</i> or the
                    <i>Descending</i> pass directions (see Figure 2 in the
                    Documentation). It is recommended to leave the parameter
                    unchanged for a first estimation and change its value in
                    case partial or no imagery is produced.
                </p>
            </ul>
        <li><p>
            Once the parameters are set, you can finally click on <i>Compute
            flood extent</i> to run the calculations. A map will appear
            underneath, with a layer containing the flooded area within the
            area of interest.
        </p>
        <li><p>
            If you wish to export the layer to file, you can click on <i>Export
            to file</i> and download the raster and/or vector data.
        </p>
    </ul>
    <p>
        In case you get errors, follow the intructions. If you have doubts,
        feel free to contact the Data Science team.
    </p>
    """,
    unsafe_allow_html=True,
)