Google Earth Engine Layer

Greppo supports the visualization and the usage of Google-Earth-Engine (GEE). You could use this to build your GEE apps in Python.

Before you can use this service, you must make sure you have access to Google Earth Engine. If not, signup to the service and wait to recieve a confirmation: GEE-Sign-Up


ee_object Pass in the earth engine image object that you would like to render on the UI. It supports the following earth engine objects Image, ImageCollection, Geometry, Feature and FeatureCollection.

name Name string value rendered on the UI, to reference it to the layer.

description Description string value rendered on the UI.

vis_params The visualisation parameters depending on the objects that have been created. For a reference check out (, or check the quick reference below.

visible Boolean toggle to turn this layer on or off.

opacity Change the opacity of the layer using a float value between 0.0 and 1.0.

vis_param : visualisation parameters quick-reference

FeatureCollection & Feature

The visualization parameters. Currently only one parameter, ‘color’, containing an RGB color string is allowed. If vis_params isn’t specified, then the color #000000 is used.

ImageCollection & Image





Object, default: null

A list of the bands to visualize. If empty, the first 3 are used.


Object, default: null

The visualization gain(s) to use.


Object, default: null

The visualization bias(es) to use.


Object, default: null

The value(s) to map to RGB8 value 0.


Object, default: null

The value(s) to map to RGB8 value 255.


Object, default: null

The gamma correction factor(s) to use.


Number, default: null

The opacity scaling factor to use.


Object, default: null

The color palette to use. List of CSS color identifiers or hexadecimal color strings (e.g. [‘red’, ‘00FF00’, ‘bluevlolet’]).



To further use GEE in Greppo, you must have a service account configured to use GEE. Follow the instructions presented here: GEE-Service-Account

You will then recieve a service-account-email-address and a key_file.json, which you will then use for making a Greppo app.

Note: Use environmental variables and store the key_file.json away from your project folder. These credentails must be kept private.

credentials = ee.ServiceAccountCredentials(email, key_file=None, key_data=None)

Authenticate earthengine-api using a Service-Account-Credential

email: The email address of the account for which to configure credentials.
    Ignored if key_file or key_data represents a JSON service account key.
    email =
    email =

key_file: The path to a file containing the private key associated with
    the service account. Both JSON and PEM files are supported.

key_data: Raw key data to use, if key_file is not specified.


from greppo import app
import ee

email = ''
key_file = 'path-to/key_file.json'
credentials = ee.ServiceAccountCredentials(email=email, key_file=key_file)

dem = ee.Image('USGS/SRTMGL1_003')
ee_image_object = dem.updateMask(
vis_params = {
    'min': 0,
    'max': 4000,
    'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5']}
name = 'DEM'
app.ee_layer(ee_object=ee_image_object, vis_params=vis_params, name=name)