Skip to content

csaybar/ee-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



ee-fastapi: Flood Detection System

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:



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.



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:

  • OpenLayer counts with a complex API. There is no reason to load external plugins for simple tasks like in Leaflet.
  • Great documentation and thousand of examples.
  • Better map projection support
  • I found the OpenLayer API more intuitive.

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

  • Name: Cesar Luis Aybar Camacho
  • Program: Copernicus Master in Digital Earth – CDE
  • Student ID: s1078735
  • Course: Geo-application Development

About

Flood Detection with Google Earth Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published