Download Sentinel-2 and Landsat-C2L2 satellite data
The code below uses the Toolbox SDK, which you can install with pip install toolbox-sdk.
Additional Python examples: using SDK, using Requests. If you prefer other programming language or need full API reference, check out Toolbox OpenAPI as well.
Docs
The tool downloads source data, prepares Sentinel-2 data and provides link to download the result.
Supported ID types are Copernicus, GoogleCloud and MPC (L2A only).
You can get ID for Copernicus catalog:
using the tool Copernicus Sentinel image search or Sentinel-2 scenes to GPKG;
on https://dataspace.copernicus.eu: sign up, find an image for your area of interest and copy its ID.
Inputs:
Scene identifier of Sentinel-2 (Level 1C and Level 2A).
Vector mask to clip the image. The format is GeoJSON, ESRI Shape (in a ZIP-archive) or any other OGR-compatible single-file format. If you don’t need to clip the scene, leave this field empty.
A list of bands. A comma separated list of numbers. The bands will be merged in the specified order, for example 4,3,2. Leave this field empty to merge all bands.
Output spatial resolution of the scene, in meters. Leave this field empty for original spatial resolution. If number is set, then all bands will be upscaled or downscaled to it using cubic interpolation. The example of interpolation is available here.
Outputs:
GeoTIFF output image
Watch on youtube.
Same territory, different resolutions: 10 m and 100 m. Swipe is used to compare the two layers¶
View the result on an interactive map: https://demo.nextgis.com/resource/4805/display?panel=layers
Try the tool in action
Click on the Demo button above the tool form. The fields are filled in with demo values.
Click on the Run button.
Note
You can download previews of the scenes using the gool Sentinel-2 scenes to GPKG to determine for which of them to download the full raster images.