Google Earth Engine Tutorial: Download Sentinel 2A Imagery
Credit: Youtube Channel “Terra Spatial, Guide on downloading high-resolution Sentinel 2A imagery at 10m resolution for various applications.”
You can see all the tutorials from here: Techgeo Academy.
Access Google Earth Engine
Visit the Google Earth Engine website to create a free account. Log in to the Earth Engine Code Editor at code.earthengine.google.com. Once logged in, you can access satellite data, including Sentinel 2A, through the platform’s API.
Select Sentinel 2A Imagery
The Sentinel 2A image collection is available as 'COPERNICUS/S2_SR'
in Earth Engine. This dataset provides surface reflectance data with 13 spectral bands and a resolution of 10-60 meters. To load the data, use the following code snippet in the Code Editor:
var dataset = ee.ImageCollection('COPERNICUS/S2_SR')
Filter Sentinel 2A Data
Use filters to select specific dates, regions, or cloud coverage. For example, to filter for images in a specific location and time range:
var filtered = dataset.filterDate('2023-01-01', '2023-12-31')
.filterBounds(ee.Geometry.Rectangle([xmin, ymin, xmax, ymax]))
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10));
Export the Imagery
To export the filtered imagery, use the Export.image
function. This exports the data to Google Drive. Example code:
Export.image.toDrive({
image: filtered.select(['B2', 'B3', 'B4']).first(),
description: 'Sentinel2A_Export',
folder: 'GEE_Exports',
fileNamePrefix: 'sentinel2a',
region: ee.Geometry.Rectangle([xmin, ymin, xmax, ymax]),
scale: 10,
crs: 'EPSG:4326',
maxPixels: 1e10
Ensure you have enabled Google Drive access in the Earth Engine settings and have sufficient storage space.
Review the Process
After running the code in the Code Editor, a task will appear in the 'Tasks' panel. Monitor the progress and download the exported file once completed. You can also use the Export.image
function to export to other storage services like Google Cloud Storage.
FAQ
How can I access Sentinel 2A data without coding?
Google Earth Engine requires coding for data access. However, you can use the Earth Engine API with Python or JavaScript to automate the process.
Can I download Sentinel 2A data in a specific format?
Yes, Earth Engine allows exporting images in formats such as GeoTIFF, PNG, or JPEG. Adjust the format
parameter in the export function accordingly.
What resolution does Sentinel 2A provide?
Sentinel 2A offers resolutions of 10 meters for visible and near-infrared bands, 20 meters for red-edge and shortwave infrared bands, and 60 meters for the atmospheric correction bands.
How do I handle cloud coverage in Sentinel 2A images?
Use the filter
method with 'CLOUDY_PIXEL_PERCENTAGE'
or apply cloud masking techniques using the ee.Algorithms.Sentinel2.CLOUD_FILTER
function.
Is there a limit on the number of images I can export?
Google Earth Engine has quotas for export tasks. Check the Earth Engine documentation for details on limits and billing.