Description Usage Arguments Details Examples
View source: R/DownloadSentinel2.R
This function requires Google Cloud Storage SDK, you can download and install this SDK from google cloud website: https://cloud.google.com/sdk/install and make sure the system PATH is set so you can use 'gsutil' tool directly in command line.
1 | DownloadSentinel2(tilename, folder, L2Flag = FALSE, regExp = NULL)
|
tilename |
what tile do you want to download |
folder |
local folder used to store downloaded files |
L2Flag |
indicate to download L2A product or L1C product (default) |
regExp |
regular expression, (default is NULL) with which you can specify which files you want. Be really careful to use this. For example, regExp <- "S2\D_MSIL\d\D_201([6]|[8][0][0-9]).*.SAFE/$" means you want data from 2016 and before 2018 before October. |
And just to notice. Most L2A data is only available after 2018, if you want to use L2A before 2018, you need to download L1C data and do the atmophere correction using sen2cor yourself. You can search if there is L2A data available in your study area using website: https://scihub.copernicus.eu/dhus/#/home , but that website doesn't support batch downloading, and download data from there is much more slower than from google cloud.
Once it started, press ctrl+c in the command line can stop it.
If there's any bug, please let me know.
Author: Jacory
1 | DownloadSentinel2("17SNA", "D:/", L2Flag = TRUE, rexExp = "S2\\D_MSIL\\d\\D_201([6]|[8][0][0-9]).*.SAFE/$")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.