I need to download a CSV file containing the acquisition date of each Sentinel-2 image in a featureCollection. I filtered the following featureCollection:
var startDate = ee.Date('2020-01-01');
var endDate = startDate.advance(1, 'year');
var s2L2A_rawData = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED")
.filterMetadata('CLOUDY_PIXEL_PERCENTAGE', 'less_than', 100)
.filter(ee.Filter.inList('MGRS_TILE', ['30SYJ']))
.filterDate(startDate, endDate)
.filterBounds(geometry);
print('Sentinel-2 L2A raw data', s2L2A_rawData);
How can I download a CSV with the date of each image to work the data locally?
Best Answer
Here is a solution which extracts the 'sysem:time_end' property using
aggregate_array
, converts the list into a FeatureCollection and downloads it to Google Drive usingExport.table.toDrive
:Alternatively you can copy the values from
dates
list in GeoJSON format and paste it into your own text document, as shown in the image below:Note that dates are stored in Unix Time.