Home

Awesome

<h1 align="center"> <br> <img src=https://user-images.githubusercontent.com/16768318/116000659-73986280-a5f1-11eb-90bf-cd87ba525deb.png width=65%> <br> ee-fastapi: Flood Detection System <br> </h1>

A ee-fastapi is a simple FastAPI web application for performing flood detection using Google Earth Engine in the backend. The module src/model.py was adapted and translated to Python from Radar-based Flood Mapping. If you want to cite the methodology, takes a look at the bibliography available here.

Installation

  1. Install Docker Compose

  2. Install the EarthEngine Python API. You must have an active Earth Engine account (the credentials are copied to the app through volumes)

  3. Run the command

docker-compose up

and point your browser to

0.0.0.0:80

to start work

Functionality

ee-fastapi use ready-to-use data freely available in the Earth Engine Data Catalog. ee-fastapi use the following public dataset:

<h1 align="center"> <br> <img src=https://user-images.githubusercontent.com/16768318/116002085-48654180-a5f8-11eb-9c7b-458503a6c344.png width=65%> <br> </h1>

Flood range dates, a hand-selected ROI, and the flood threshold are sent from the front-end to the back-end using fetch. The users control the response through two buttons: display and download. The display button will attach XYZ map tile resources with the results to the OpenLayer map. These tiles are obtained after running the model and the ee.data.getMapId method. On the other hand, the download button will download the flood area in a GeoPackage vector format.

<h1 align="center"> <br> <img src=https://user-images.githubusercontent.com/16768318/116000403-544d0580-a5f0-11eb-8e77-fa8e5e6e46a2.gif width=75%> <br> </h1>

Design decisions

Why OpenLayer?

It was my first project using OpenLayer, and I can say that I did not miss Leaflet at all!. In my opinion, OpenLayers has much more advantages over Leaflet. Here are some reasons from the point of view of a novice Web GIS user:

Why Google Earth Engine?

Google Earth Engine has everything: tons of publicly available datasets, a great well-documented API, and high-performance computing.

Why fetch?

Fetch API does not need to be installed as a dependency. It utilizes a modern JS syntax and is based on promise rather than callbacks.

Student personal information