I try to get all acquisition dates of my ImageCollection in Google Earth Engine Code Editor.
var begin = ee.Date.fromYMD(2017,1,1,'Europe/Berlin');
var end = ee.Date.fromYMD(2018,1,1,'Europe/Berlin');
var orbnr = ee.Number(15);
//Load S1 ImageCollection and filter by Location and Date
var s1_collection = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterDate(begin,end);
//Filter S1 IC by OrbitNr.
var s1_collection_f = s1_collection
.filter(ee.Filter.eq('relativeOrbitNumber_stop',orbnr));
//Get Dates with ee.image.date() while mapping over the ImageCollection
var get_date = function(image) {
var dates = ee.List(image.date())
return s1_dates.add(dates)};
s1_collection_f.map(get_date);
Last 4 lines of code seems to be wrong. Do i write the function the right way? First time i try to write my own function in javascript.... Do i have to assign a empty list bevore i call s1_dates.add(dates) ? When how can i assign a empty list. Or is it better to use a 1D array instead?