Geographic Information Systems Asked by Erincon on July 28, 2021
I’ve been trying to list a ee.ImageCollection()
in GEE but by using time indexing and I came up with this solution:
var geometry = ee.Geometry.Polygon([[-86.036445612425396,
11.175779794553685 ],
[ -86.036445612425396, 9.362885788210679 ],
[ -83.883633979893077, 9.362885788210679 ],
[ -83.883633979893077, 11.175779794553685 ],
[ -86.036445612425396, 11.175779794553685 ]]);
var start_date = '1979-01-01'
var end_date = '2019-12-31'
var Landsat = ee.ImageCollection('LANDSAT/LE07/C01/T1_TOA')
.filterBounds(geometry)
.filterDate(start_date,end_date);
var listOfImages = Landsat.toList(Landsat.size())
By doing this, I can index each image like this:
var firstImage = listOfImages.get(0)
Map.addLayer(ee.Image(firstImage))
However, this method indexes one scene of the collection each time. I mean, firstImage
is the Landsat scene LANDSAT/LE07/C01/T1_TOA/LE07_015052_20000221
.
I would like to know how to mosaic an image collection and index them by time. For example, getting the whole mosaic as a result of running this instruction: Map.addLayer(Landsat.median().select('B4'))
, in general, being able to get Map.addLayer(Landsat.get(nth-image).select('B4'))
.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP