Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Run Google Earth Engine Python Workflows Directly in QGIS with the Geemap Plugin

As the last project of 2025, I am releasing the Geemap QGIS plugin, which brings geemap functionalities into QGIS. If you have used geemap in Jupyter Notebooks to work with Google Earth Engine, you can now run the same Python code inside QGIS, overlay Earth Engine data with your existing GIS layers, inspect pixel values, and download datasets, all within a single desktop environment.

The plugin works alongside the QGIS Notebook plugin, giving you an interactive notebook interface for step-by-step Earth Engine workflows right inside QGIS.

Video tutorial: Geemap Plugin for QGIS

What You Will Need

Set Up the Environment

Install Pixi and create a project

pixi init geo
cd geo
pixi add qgis geemap

Authenticate Google Earth Engine

pixi run earthengine authenticate

This opens a browser tab for Google authentication. The credential is saved locally and typically lasts about a week.

Launch QGIS

pixi run qgis

Install the Plugins

You need two plugins: the Notebook plugin (for Jupyter-style code cells) and the Geemap plugin.

  1. Go to Plugins > Manage and Install Plugins.

  2. Search for Notebook and click Install Plugin.

  3. Search for Geemap and click Install Plugin. If it is not yet available in the official repository, add the opengeos custom repository URL under Settings > Plugin Repositories.

  4. Make sure both plugins are checked (enabled) in the installed plugins list.

After installation, three new toolbar entries appear: the Notebook plugin, the Geemap panel, and the Geemap settings.

Initialize Earth Engine

  1. Click the Geemap Settings button in the toolbar.

  2. Enter your Google Cloud project ID.

  3. Click Initialize Earth Engine.

  4. If the status shows “Initialized,” you are ready to go.

If you encounter errors, open the QGIS Python console (Plugins > Python Console) and run:

import ee
ee.Authenticate()
ee.Initialize(project="your-project-id")

Use the Geemap Panel

The Geemap panel provides a quick way to run Earth Engine code without opening a notebook.

Code block

Paste any geemap or Earth Engine Python code into the code block area and click Run. For example:

import ee
import geemap

dem = ee.Image("USGS/SRTMGL1_003")
vis = {"min": 0, "max": 4000, "palette": ["006633", "E5FFCC", "662A00", "D8D8D8", "F5F5F5"]}
geemap.add_layer(dem, vis, "SRTM DEM")

states = ee.FeatureCollection("TIGER/2018/States")
geemap.add_layer(states, {}, "US States")

The data layers appear directly on the QGIS map canvas, overlaid with any other layers you have loaded.

Basemap tab

The basemap tab provides a selection of basemaps (Google Satellite, OpenStreetMap, etc.) that you can add to the map with a single click.

Inspector

The inspector tool works like the Earth Engine Code Editor’s inspector:

  1. Click the Inspector button in the Geemap panel.

  2. Click anywhere on the map.

  3. The panel shows pixel values for raster layers (images) and attribute tables for vector layers (feature collections).

This is especially useful for verifying data values and exploring feature properties without writing any code.

Data download

The Geemap panel includes a download tool for exporting small Earth Engine datasets:

  1. Click the Download button.

  2. Select the data layer to download.

  3. Define the extent (map extent or draw a rectangle).

  4. Set the resolution (e.g., 30 m).

  5. Choose the coordinate system and output format (GeoTIFF).

  6. Specify the output file path and click Export.

Note that Google Earth Engine limits the size of direct downloads. For large datasets, use the Earth Engine export-to-Drive workflow or the xee package.

Use Jupyter Notebooks in QGIS

For more complex workflows, the Notebook plugin provides a full Jupyter-style interface inside QGIS.

Open a notebook

  1. Click the Notebook button in the toolbar.

  2. Click Open to load an existing .ipynb file, or start a new notebook.

Sample notebooks are available in the plugin repository. Download an example and open it in the notebook panel.

Run code cells

Each cell runs independently, just like in Jupyter. You can mix Markdown cells (for documentation) with code cells. For example:

import ee
import geemap

ee.Initialize(project="your-project-id")

# Load Sentinel-2 imagery
collection = (
    ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED")
    .filterBounds(ee.Geometry.Point([-122.4, 37.8]))
    .filterDate("2025-12-01", "2025-12-31")
    .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 5))
)

print(f"Number of images: {collection.size().getInfo()}")

image = collection.first()
vis = {"bands": ["B4", "B3", "B2"], "min": 0, "max": 3000}
geemap.add_layer(image, vis, "Sentinel-2")
geemap.center_object(image, zoom=10)

Any data layer added with geemap.add_layer() appears on the QGIS map canvas, where it can be combined with other QGIS layers, styled, exported, or analyzed with standard QGIS tools.

I also recommend installing the LeafMap QGIS plugin, which provides:

Install it from Plugins > Manage and Install Plugins by searching for “leafmap.”

Resources

This plugin bridges the gap between Earth Engine’s cloud computing power and QGIS’s desktop GIS capabilities. Any geemap or Earth Engine Python code you already have can run inside QGIS with minimal changes. Feel free to open an issue on the GitHub repository if you run into any problems.