1

I am using Earth Engine to retrieve Sentinel 2 data. I thought that for a given date and place, I would find only one Sentinel image (revisit time is multiple days). I notice however that for some dates, Earth Engine records two images that seem very similar (at least visually: same values, same bounding box).

Why are there two images? If I were to take only one, which one should I take?

Code: https://code.earthengine.google.com/0dd7199e04a6ca5b22684fb3a09a8c40

var senti_same = ["20150803T170236_20160825T061733_T15SXD",
                  "20150803T170231_20160520T064257_T15SXD"]
var senti2 = ee.ImageCollection("COPERNICUS/S2").
    filter(ee.Filter.inList("system:index", senti_same))

print(senti2)

var senti2_list = senti2.toList(2);

print(ee.Date(ee.Image(senti2_list.get(0)).get("system:time_start")))
print(ee.Date(ee.Image(senti2_list.get(1)).get("system:time_start")))


// map
Map.setCenter(-91.1625, 39.2862, 9)
Map.addLayer(ee.Image(senti2_list.get(0)), 
             {bands: ["B4", "B3", "B2"], max: 255*10}, "image 2")
Map.addLayer(ee.Image(senti2_list.get(1)), 
             {bands: ["B4", "B3", "B2"], max: 255*10}, "image 2")
1

As per the user handbook, file naming conventions include date and timestamp of data collection and processing. For the two images you include, the timestamp for image collection was at 17:02:36 and 17:02:31 on 03 Aug 2015. So, the values are likely nearly identical because the two images were captured 5 seconds apart from one another. As far as which one to take, it's probably worth looking to see if there are any differences in metadata that would lead you to choose one over the other.

Edit: this additional snippet of code provides further support that there aren't any major differences between the two images:

var senti_img1 = ee.Image("COPERNICUS/S2/20150803T170236_20160825T061733_T15SXD");
var senti_img2 = ee.Image("COPERNICUS/S2/20150803T170231_20160520T064257_T15SXD");

var diff = senti_img1.subtract(senti_img2);
Map.addLayer(diff,{},"Difference");

Second edit: Looking at each band of var diff it doesn't look like any differences exist in data layers or in QA layers.

print(diff);
Map.addLayer(diff.select("B1"),{},"Difference band 1");
Map.addLayer(diff.select("B2"),{},"Difference band 2");
Map.addLayer(diff.select("B3"),{},"Difference band 3");
Map.addLayer(diff.select("B4"),{},"Difference band 4");
Map.addLayer(diff.select("B5"),{},"Difference band 5");
Map.addLayer(diff.select("B6"),{},"Difference band 6");
Map.addLayer(diff.select("B7"),{},"Difference band 7");
Map.addLayer(diff.select("B8"),{},"Difference band 8");
Map.addLayer(diff.select("B8A"),{},"Difference band 8A");
Map.addLayer(diff.select("B9"),{},"Difference band 9");
Map.addLayer(diff.select("B10"),{},"Difference band 10");
Map.addLayer(diff.select("B11"),{},"Difference band 11");
Map.addLayer(diff.select("B12"),{},"Difference band 12");
Map.addLayer(diff.select("QA10"),{},"Difference band QA10");
Map.addLayer(diff.select("QA20"),{},"Difference band QA20");
Map.addLayer(diff.select("QA60"),{},"Difference band QA60");
|improve this answer|||||
  • thanks! I guess I was confused about the fact that there are sometimes two images taken at nearly the same time! Did you see that mentioned in the handbook, I think I missed it? – Matifou Feb 17 '19 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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