2

I would like to ask if someone knows how to extract collection of scenes (equal to the exact size of the Landsat 7 scene) from image collection I need an area around Bangalore, India? So I would have the stack of scenes. For now I have this code where I have added area corners manually (and while editing the number of images was changing. The largest one I got was 168):

var l7r = ee.ImageCollection("LANDSAT/LE7_L1T"),
real = {"opacity":1,"bands":["B3","B2","B1"],"min":76,"gamma":2.07};//real
Map.setCenter(77.40, 13.14,7);
//input study regionr
var LL=[76.48, 12.31];   //Lower left corner
var UR=[78.15, 13.69];   //Upper right corner
var l7rf=l7r.filterBounds(ee.Geometry.Point(LL)).filterBounds(ee.Geometry.Point(UR));
Map.addLayer(ee.Image(l7rf.first()),real,'raw');

But I am not sure if all images available from the 1999 till nowadays are included.

0

1 Answer 1

2

So here is what I have done. I have checked name of one of the images in the collection. At the place where numbers start first 3 corresponded to the path, and next 3 numbers correspond to the row of an image. So that is how I have changed my code:

var l7r = ee.ImageCollection("LANDSAT/LE7_L1T")
.filter(ee.Filter.eq('WRS_PATH', 144))
.filter(ee.Filter.eq('WRS_ROW', 51));

And I have used these code to check image names, and dates of the images:

// This function adds a band representing the image timestamp.
var addTime = function(image) {
      return image.addBands(image.metadata('system:time_start'));
};

// Map the function over the collection and display the result.
print(l7r.map(addTime));

Your Answer

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

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