This question concerns the merging of the following Google Earth Engine collections:
- USGS Landsat 5 TM Collection 1 Tier 1 Raw Scenes (LANDSAT/LT05/C01/T1)
- USGS Landsat 7 Collection 1 Tier 1 Raw Scenes (LANDSAT/LE07/C01/T1)
- USGS Landsat 8 Collection 1 Tier 1 Raw Scenes (LANDSAT/LC08/C01/T1)
I want to extend the "Landsat Simple Composite" example by loading similar collections from Landsat 5 and Landsat7, so that more years' composites are available. I tried to first merge these three collections into a big one, before passing it to the Simple Composite algorithm:
// Composite 6 months of Landsat 8.
var l5 = ee.ImageCollection("LANDSAT/LT05/C01/T1");
var l7 = ee.ImageCollection("LANDSAT/LE07/C01/T1");
// Note that the input to simpleComposite is raw data.
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1');
var lall = ee.ImageCollection(l5.merge(l7).merge(l8));
// The asFloat parameter gives floating-point TOA output instead of
// the UINT8 outputs of the default simpleComposite().
var composite = ee.Algorithms.Landsat.simpleComposite({
collection: lall.filterDate('2015-1-1', '2015-7-1'),
asFloat: true
});
// Pick a spot with lots of clouds.
Map.setCenter(-47.6735, -0.6344, 12);
// Display a composite with a band combination chosen from:
// https://landsat.usgs.gov/how-do-landsat-8-band-combinations-differ-landsat-7-or-landsat-5-satellite-data
Map.addLayer(composite, {bands: ['B6', 'B5', 'B4'], max: [0.3, 0.4, 0.3]});
However, this returned the error:
Layer 1: Layer error: Image.visualize: No band named 'B6'. Available band names: [B1, B2, B3, B4, B5, B6_VCID_1, B6_VCID_2, B7, B8].
I see that the bands from these three collections are not the same, but on the other hand, l5.merge(l8)
runs with no errors. What's the best way to merge these collections?