0

I have a landsat image collection. I want to select third and fourth image using the features ID (index number) not using the image metadata.

How it can be achieved?

enter image description here

On console we see features as a GeoJSON. I want to select any image by feature ID like

features.4; // 4th image

If it's a list

features[4];
1
  • Please add your code as text, not picture. Commented Jan 26, 2022 at 5:34

1 Answer 1

1

You can transform the ImageCollection into a ee.List and then access the desired images using the index numbers. The only argument you need to indicate in the .toList() method is the maximum number of elements to fetch, which you can set as the size of the ImageCollection.

myCollection = myCollection.toList(myCollection.size());

myCollection.get(4);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.