Skip to content

The following is a Python example of the Google Earth Engine API in QGIS, for monitoring and tracking wildfires. In addition, it includes some examples adapted from the examples developed as recommended practices of the UN-SPIDER program.

License

Notifications You must be signed in to change notification settings

UN-SPIDER/qgis-earthengine-Fires-Monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring wildfires with the Google Earth Engine plugin for QGIS

License: MIT

Forest Fires in Honduras, April 2020. Image: Copernicus.

Forest fires in Honduras in 2020. Image: ESA.

1. Description

The following is an example of using Google Earth Engine API Documentation via the Google Earth Engine plugin for QGIS for monitoring and tracking wildfires in QGIS. This script adapts examples for the use of GEE in QGIS from the Google Earth Engine plugin, qgis-earthengine-examples and Earth Engine API repositories. In addition, it also makes use of the UN-SPIDER Recommended Practice on burn severity mapping.

2. Setup

To use the script for monitoring wildfires provided below, you will need a Google Earth Engine account and a QGIS installation.

2.1. Install the Google Earth Engine plugin for QGIS

To connect to Google Earth Engine from within QGIS, install the Google Earth Engine Plugin for QGIS. To do this, go to the top menu of QGIS and click on Add-ons> Manage and install add-ons .... In the search box, search for "Google Earth", select the plugin and install it. Once installed, the plugin will verify whether you are authenticated to use GEE. If that is not the case yet, you will be asked to authenticate with your credentials.

GEE plugin

GEE Plugin

2.2. Add more basemaps to QGIS

It can be helpful to have additional basemaps available for working with QGIS. To add basemaps, you can make use of scripts developed by the QGIS community. For instance:

  • Open the Python Console in QGIS and import this Python script.
  • Click the Run script button on the Python Console to execute the script. This will add many basesmaps as XYZ tiles to QGIS. Select and double-click any basemap under XYZ tiles to add it to the QGIS canvas. See the screenshot below. Alternatively, you can install the QGIS QuickMapServices plugin. After installing the plugin, go to QGIS -- Web --QuickMapServices -- Settings -- More services -- Get contributed pack -- Save.

QGIS Basemaps

2.3. Access Google Earth Engine from QGIS

Once installed and authenticated, you can access the Google Earth Engine plugin for QGIS from the QGIS Python Console to write and run scripts that make use of Google Earth Engine. To test if the plugin is installed and authenticated correctly, type the following in the QGIS Python Console:

Check Install

Note that QGIS projects that contain Earth Engine layers can be saved. In this case, the code required to connect to Google Earth Engine is stored in a QGIS project and used to reinitialize these layers when the project is loaded again. Currently, this only works when the plugin is installed in the QGIS installation where these layers are loaded.

Demo:

qgis-gee-demo

The above code asks Google Earth Engine for an image and adds it as an XYZ tile layer to the QGIS canvas.

3. Script for wildfire monitoring

The following script uses Earth observation data products available in the Google Earth Engine Data Catalog to identify fire locations and assess the burn severity of an area after a fire.

In addition, the script processes Sentinel-2 imagery to identify burn severity. For more details, please see the UN-SPIDER Recommended Practice on burn severity mapping.

Running the script To import the Python script in QGIS, download it to your hard drive, open the QGIS Python Console and then select it there. Click the "run script" button to execute the script. You can now inspect the results on the QGIS canvas.

The script is also available as a Jupyter Notebook.

The compilation has been created to support the UN-SPIDER Knowledge Portal.

About

The following is a Python example of the Google Earth Engine API in QGIS, for monitoring and tracking wildfires. In addition, it includes some examples adapted from the examples developed as recommended practices of the UN-SPIDER program.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published