Using Planet in GEE

last updated: September 07, 2022

Using Planet in Google Earth Engine

Band combinations

Set your band combinations to visualize the Planet map layer. True color settings produce a “natural” visualization. False color visualizations reveal and enhance spectral data otherwise invisible to the human eye. For example, re-ordering the near-infrared, green and red bands from 8-band imagery emphasizes the near-infrared features that can highlight vegetation health.

For more information on the Planet’s spectral bands, see the Band order and sensor frequency table at Understanding PlanetScope Instruments.

Visualizing your imagery: 4-band images

True color

You may see black footprints when you first Map.addLayer your image collection. To generate a true color visualization, add visualization parameters to your addLayer request. The band order on the Planet 4-band sensors is: Blue, Green, Red, NIR.

Map.addLayer(imageCollection, {"opacity":1,"bands":["B3","B2","B1"],"min":405.79,"max":4499.71,"gamma":2.331})

False color infrared

To generate a false color infrared image, simply swap around the bands.

Map.addLayer(imageCollection, {"opacity":1,"bands":["B4","B2","B3"],"min":405.79,"max":4499.71,"gamma":2.331})

Visualizing your imagery: 8-band images

True Color

The following example displays the “natural” red, green, and blue bands from the imagery:

Map.addLayer(imageCollection, {"opacity":1,"bands":["B6","B4","B2"],"min":405.79,"max":4499.71,"gamma":2.331})

False color infrared

In the following example, by ordering near infrared, green, and red bands users can create a false color infrared display that highlights the near-infrared data in your imagery. False color infrared is useful for seeing differences in vegetation.

Map.addLayer(imageCollection, {"opacity":1,"bands":["B8","B4","B6"],"min":405.79,"max":4499.71,"gamma":2.331})

Band Math

NDVI on 4-band imagery

This code sample runs on an image (as opposed to an imageCollection) and uses GEE's normalizedDifference function to generate a Normalized Difference Vegetation Index (NDVI) output from Planet's NIR & Red spectral channels.

Map.addLayer(image.normalizedDifference(['B4', 'B3']).rename('NDVI'), {min: -1, max: 1, palette: ['blue', 'white', 'green']});

NDVI on 8-band imagery

Map.addLayer(image.normalizedDifference(['B8', 'B6']).rename('NDVI'), {min: -1, max: 1, palette: ['blue', 'white', 'green']});

Working with cloud masks: UDM2

Visualizing usable pixels

Ordering a Planet imagery bundle like analytic_sr_udm2 appends the Usable Data Mask 2.0 (UDM2) bands to your 4-band PlanetScope images, resulting in a twelve band image in Earth Engine.

Map.addLayer('Q8'), {min: 0, max: 1, palette: ['black', 'white']});

Rate this guide: