Using Planet in GEE

last updated: June 14, 2021

Using Planet in Google Earth Engine

Visualizing your Imagery

True Color

You may see black footprints when you first Map.addLayer your image collection. To generate a true color visualization try adding the following visualization parameters to your addLayer request.

Planet's imagery bands are ordered: Blue, Green, Red, NIR.

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

False Color

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})

Band Math


This code sample runs on an image (as opposed to an imageCollection) and uses GEE's normalizedDifference function to generate a 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']});

Working with cloud masks: UDM2

Visualizing usable pixels

Ordering a Planet imagery bundle like analytic_sr_udm2 will append Planet's usable data mask 2.0 (udm2) bands to your 4-band PlanetScope images, resulting a 12 band image in Earth Engine.

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