Returns the first entry from a given collection.
Usage | Returns | ImageCollection.first() | Image |
Argument | Type | Details | this: imagecollection | ImageCollection | The ImageCollection instance. |
Examples
Code Editor (JavaScript)
var image = ee.ImageCollection('COPERNICUS/S2_SR').first();
Map.centerObject(image, 8);
var vis = {bands: ['B4', 'B3', 'B2'], min: 0, max: 5000};
Map.addLayer(image, vis, 'first of S2_SR');
// Image COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK (21 bands)
// type: Image
// id: COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK
// version: 1559715954270152
// bands: List (21 elements)
// properties: Object (82 properties)
print(image);