https://code.earthengine.google.com/f06fe3e5961eb031cb16ca81d115d873
Filtering image collection based on:
- Time of interest
- Area of interest
- Metadata (cloud cover, path, row, etc.)
var geometry = ee.Geometry.Point([108.94553918036411,11.566755394830713])
var start = '2018-01-01';
var end = '2018-12-31';
var L8_col = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterBounds(geometry)
.filterDate(start,end)
.filter(ee.Filter.eq('WRS_PATH',123))
.filter(ee.Filter.eq('WRS_ROW',52))
.filter(ee.Filter.lt('CLOUD_COVER',95))
.sort('CLOUD_COVER') //first image will be the less cloudy image in the collection
Map.centerObject(geometry,10)
print(L8_col.size(),'L8_col size') //.size() is the number of images
print(L8_col.first(),'first image') //first image will be the less cloudy image