I am currently working on google earth engine and I have created an image collection with 15 images in it. What i want to do is to create an image for every single image in my collection. I was able to create an image for the first image of my collection by doing :
var Image1 = ee.Image(Collection.first());
Although i would like to do that for the 15 images. Is there any way to do a loop that reads the entire collection and creates images by iterating. The first one would be Image1, and then Image2, Image3 and so on...
Answer
I think that the easiest way to do it is to transform the image collection into a List.
var listOfImages = myCollection.toList(myCollection.size());
and access each image using indices, like:
var img1 = listOfImages[0];
var img2 = listOfImages[1];
No comments:
Post a Comment