Geospatial Technology Innovation from Google. While writing the post, I imagined if I could use Google Earth Engine in QGIS rather than in a web browser, because at that time I felt a little bit weird doing GIS thing in a web browser.
Like a dream come true, just several days ago, the Google Earth Engine plugin for QGIS was released. The plugin was authored by Gennadii Donchyts with first version 0.0.1 and working with minimum QGIS version 3.8.0.
Google Earth Engine Plugin Installation
Like any other plugins, the GEE plugin can be installed from QGIS plugin repository. Let's see how to install in the following step.
From the Plugin menu select Manage and Install Plugins... The plugin windows will appear as in figure 1. In the search menu type google. The Google Earth Engine plugin will show up. Select it and push Install Plugin button
|Figure 1. Google Earth Engine QGIS Plugin Installation|
In the installation process, an authorization token is required. Therefore we need to log in to google account to get the token. As shown in figure 2, log in to your google account and copy the key. Paste the key to the Authorization window as in figure 3.
|Figure 2. Log in to google account to get authorization token|
|Figure 3.. Authorization window|
Testing The Installation
To test the plugin installation, open python console as in figure4. Then import the Google Earth Engine module with import ee code syntax. Run the code. If there is no error appear, then the plugin was successfully installed.
|Figure 4. Testing Google Earth Engine Plugin Installation|
How to Use Google Earth Engine Plugin in QGIS?
Google Earth Engine is a scripting module. To use it we need to know the code syntax or function to do a job, a processing or analysis task. There are many things we could do with Google Earth Engine, because it has so rich dataset and analysis tools. With this plugin available in QGIS, we can access directly the dataset and doing analysis in QGIS, which made it's so powerful to do remote sensing data processing and analysis.
Now, let's see how to use the Google Earth Engine plugin in QGIS with some examples.
Adding Data/Satellite ImageryFor the first example we will add Landsat 8 satellite imagery with false color composite. To add a data or satellite imagery from Google Earth Engine we need to know the image full name. In the Google Earth Engine Data Catalog can be found the dataset's name and all the details. The following code shows how to add Landsat satellite imagery in QGIS with Google Earth Engine. Figure 5 shows the Landsat 8 imagery was added to QGIS map canvas.
|Figure 5. Landsat 8 satellite imagery false color composite in QGIS|
Normalized Difference Vegetation Index (NDVI) Calculation
The next example we will perform NDVI calculation using the same imagery. To do NDVI calculation, Red and Near Infrared satellite bands are required. In Landsat 8 the Red band is band 4 and band 5 is near infrared. To calculate NDVI values, the normalizedDifference function is used. The following code shows how to calculate NDVI with Google Earth Engine scripts and the result can be seen in the figure 6.
|Figure 6. NDVI image result|
Quantifying Forest ChangeLast example in this post, we will quantify forest change based on Hansen global forest change data. In the code below, two images are selected each for gain and loss. Using And operator the two images are combined, so we get gain and loss image. The result can be seen in the figure 7. Find out more about this tutorial in Global Forest Change Tutorial.
|Figure 7. Quantifying forest change|
That's all this post about Google Earth Engine Plugin for QGIS 3. In this post we had learnt how to install the Google Earth Plugin in QGIS, testing the installation and see some examples how to apply it in QGIS. Thanks for reading.