I wanted to export an imagery data from GEE, based on its doc. I needed to retrieve the projection information from a band of the original image. I used following codes:
var geometry = ee.Geometry.Rectangle([-114.3461, 51.2335, -113.8015, 50.8140]);
function maskS2clouds(image) {
var qa = image.select('QA60');
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = 1 << 10;
var cirrusBitMask = 1 << 11;
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
.and(qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask).divide(10000);
}
var S2_collection = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED").filterDate('2019-08-01', '2019-08-30').filterBounds(geometry)
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE',20)).map(maskS2clouds);
var S2_bands = ['B4', 'B3', 'B2'];
var S2_mosaic = S2_collection.median().select(S2_bands).clip(geometry);
var S2_display = {bands: S2_bands, min: 0, max: 0.3};
Map.addLayer(S2_mosaic, S2_display, "S2_Image");
Map.centerObject(geometry);
var projection = S2_collection.select('B2').projection().getInfo();
But error: Line 28: S2_collection.select(...).projection is not a function
Would you please help?