/qgis-earthengine-examples

A collection of 300+ Python examples for using Google Earth Engine in QGIS

Primary LanguagePythonMIT LicenseMIT

qgis-earthengine-examples

License: MIT

A collection of 290+ Python examples for using Google Earth Engine in QGIS

Contact: Qiusheng Wu (https://wetlands.io)

1. Description

This repository is a collection of 290+ Python examples for the Google Earth Engine plugin for QGIS. I developed these Python examples by converting all the JavaScript examples (except those not yet supported by plugin) from the Google Earth Engine API Documentation. Additionally, some examples were adapted from Gena's examples and the Earth Engine API examples. Kudos to Gennadii Donchyts for developing this amazing Google Earth Engine plugin for QGIS.

2. Usage

  • Step 1: Sign up for Google Earth Engine.
  • Step 2: Install QGIS.
  • Step 3: Install the Google Earth Engine Plugin for QGIS and authenticate Google Earth Engine.
  • Step 4: Git clone or download this repository.
  • Step 5: Open the Python console in QGIS and load any downloaded Python script into the QGIS Python Editor.
  • Step 6: Click the Run script button on the Python Editor to execute the script.
  • Step 7: Zoom in/out the QGIS Canvas to inspect the results.

3. Add QGIS Basemaps

  • Open the Python console in QGIS and load the Python script (Basemaps/qgis_basemaps.py) into the QGIS Python Editor.
  • Click the Run script button on the Python Editor to execute the script. This will add many basesmaps as XYZ tiles to QGIS. Select and double click any basemap under XYZ Ttiles to be added to 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

4. Earth Engine QGIS Plugin Demo

qgis-gee-demo

5. Earth Engine and Folium Interactive Mapping

If you do not have QGIS installed on your computer, you can try Earth Engine API and the folium library for interactive mapping. A Jupyter notebook example can be found here.

6. QGIS Examples

The Table of Contents below mimics the structure of the Google Earth Engine API Documentation. I strongly encourage you to check out the API Documentation if you need an in-depth explanation of each Python example. Please note that the list below does not include all the Python examples contained in this repository. You are welcome to explore the repository and find more examples to suit your needs.