How do I find Sentinel-2 dataset ID on Google Earth Engine?
Two issues with your script:
1) A single image works best when you use ee.Image
instead of ee.ImageCollection
.
2) You switched up the granule name. The first part is the sensing time and the second the ingestion time. An acquisition taken in 2016 cannot be ingested in 2015. It should be 20150828T110656_20160412T015159_T30SVG
not the other way round.
As a complete script (on EarthEngine):
// not in Collection - switched sensing and acquisition time
// var s2 = ee.Image('COPERNICUS/S2/20160412T015159_20150828T110656_T30SVG');
// in Collection - correct granule
var s2 = ee.Image('COPERNICUS/S2/20150828T110656_20160412T015159_T30SVG');
Map.addLayer(s2, {bands: ['B8', 'B4', 'B3'], max: 4000}, 'S2')
Map.centerObject(s2, 8);
This is the documentation for the Sentinel-2 dataset on the Google Cloud Platform: https://cloud.google.com/storage/docs/public-datasets/sentinel-2
This is the actual dataset: https://console.cloud.google.com/storage/browser/gcp-public-data-sentinel-2/tiles/?_ga=1.77516694.2042140325.1496307293
which refers to the military grid system that you can find here: https://mappingsupport.com/p/coordinates-mgrs-google-maps.html
Now the GRANULE numbers for images before December 2016 are slightly different.
- Find the first 15 digit number from https://scihub.copernicus.eu/dhus/#/home
Here the numbers will be something like this: Filename: S2A_OPER_PRD_MSIL1C_PDMC_20161019T100431_R047_V20161018T040752_20161018T042009
Use the 15 digit number after PDMC_ in the above line to search within the dataset after getting the grid number:
To link it with the Google Earth Engine Platform:
var scene = ee.Image('COPERNICUS/S2/###############_###############_#####');
The above code line shows us how to access the data set. There are two 15 digit numbers and a 5 digit number. Presuming you are in the Google cloud dataset.
The first 15 digit number in the code after ~S2/~ is the number after S2A_MSIL1C_###############_N ... .SAFE This is found in the first directory of your image, it is the acquisition date.
The second number is the 15 digit number of the images nested in the GRANULE directory. This is image ingestion date and just like Kersten says and is of a latter date. For example: S2A_OPER_MSI_L1C_TL_MTI__###########################_N02.04
The 5 digit number (=grid reference) is the one before N02.04.
For images after November 2016 downloading the Metadata and using the two 15 digit numbers and 5 digit grid code from generally the last 3-5 lines of the data set and whichever has the .jp2 file extension: GRANULE/L1C_#####A008081###############/QI_DATA/#####_###############_PVI.jp2
Here the first 5 digit number after L1C_ and QI_DATA/ is the grid code. The rest two are either of the two 15 digit numbers.
Phew I hope everyone understands this.