I'm plotting the least cloudy Sentinel image in MGRS tile '11SPV', but it's rendered as a narrow triangle on the Western edge of the tile. I've changed the temporal range but the same thing occurs. Is this a clash of projections, or something else entirely?
The co-ordinates of tile 11SPV are:
EPSG 32611
MGRS_REF
36.13956045 -115.88852197
36.124095832 -114.77760861
35.223124941 -114.80245835
35.238087535 -115.90095919
UTM_WKT MULTIPOLYGON(((600000 4000020,600000 3890220,709800 3890220,709800 4000020,600000 4000020)))
LL_WKT MULTIPOLYGON(((-115.888519424674 36.1397407305084,-115.902146161155 35.1499160380147,-114.697342097699 35.1330063316074,-114.668785361013 36.1222067277992,-115.888519424674 36.1397407305084)))
Screenshot of the output below.
// var START_DATE = '2017-02-15';
// var END_DATE = '2017-04-15';
var MGRS_TILE = '11SPV';
var s2_unsorted = ee.ImageCollection('COPERNICUS/S2')
.filterMetadata('MGRS_TILE', 'equals', MGRS_TILE)
.filterDate('2020-07-01', '2020-07-31');
var s2_sorted = s2_unsorted.sort('CLOUDY_PIXEL_PERCENTAGE');
var least_cloudy_image = ee.Image(s2_sorted.first());
Map.centerObject(least_cloudy_image);
Map.addLayer(
least_cloudy_image,
{bands:'B4,B3,B2', min:0, max:3000},
'least cloudy image'
);
print('least cloudy image', least_cloudy_image);
// It can be useful to print out the image collection, and the list of metadata properties to confirm that it is working the way you expect:
var MAX_IMAGES_IN_LIST = 100;
var getCloudMetadata = function (coll) {
return coll.toList(MAX_IMAGES_IN_LIST).map(
function (i) {
return ee.Image(i).get('CLOUDY_PIXEL_PERCENTAGE');
}
);
};
// print(
// 'START_DATE', START_DATE,
// 'END_DATE', END_DATE,
// 'MGRS_TILE', MGRS_TILE
//);
print(
's2 (unsorted)', s2_unsorted,
'CLOUDY_PIXEL_PERCENTAGE metadata', getCloudMetadata(s2_unsorted)
);
print(
's2 (sorted)', s2_sorted,
'CLOUDY_PIXEL_PERCENTAGE metadata', getCloudMetadata(s2_sorted)
);