❗WARNING: This repository has been deprecated! Please use the following repo for the HYDRAFloods viewer webapp: https://github.com/Servir-Mekong/hydrafloodviewer ❗ |
---|
The HYDRAFloods Viewer is a web application used to view flood map results from the HYDRAFloods processing package along with additional hydrologic variables.
The HYDRAFloods viewer is a web application built using the Tethys Platform, so first off you will need to install Tethys.
Once you have the Tethys platform installed, you will need to start the Tethys environment...
$ . activate tethys
(tethys) $
... and install the dependencies for the HYDRAFloods Viewer (rastersmith
and hydrafloods
) and their dependencies (gdal
,cartopy
,pillow
, andxarray
) to run the application:
(tethys) $ conda install -c conda-forge gdal
(tethys) $ conda install -c conda-forge cartopy
(tethys) $ conda install -c conda-forge pillow
(tethys) $ conda install -c conda-forge xarray
(tethys) $ pip install rastersmith
(tethys) $ pip install hydrafloods
Furthermore, the Earth Engine Python API needs to be installed and authenticated to access historical water maps:
(tethys) $ pip install google-api-python-client
(tethys) $ pip install earthengine-api
(tethys) $ pip install --upgrade oauth2client
(tethys) $ earthengine authenticate
Next, clone the HYDRAFloods Viewwer repository from GitHub:
(tethys) $ git clone https://github.com/servir-mekong/tethysapp-hydraviewer.git
Change directories into the cloned repo and install the application for development:
(tethys) $ cd tethysapp-hydraviewer/
(tethys) $ python setup.py develop
Now, the HYDRAFloods Viewer is installed and your users can access the most recent flood maps from satellite imagery.
To customize the viewer's initial state and where the historical/flood water maps are displayed, the admin must update the bounding within the config.py
file.
For example, to show results only over Myanmar, the admin must specify the bounding box around the country and the HYDRAFlood Viewer by changing the WEST
, SOUTH
, EAST
, and NORTH
variables.