Fast way to Downloading Sentinel-2

Hi All,
Just wondering if any one knows a good and fast way to download S2 data from a good web link.
I used to use scihub but its a nightmare for me and I have windows and it always crashed or even not completed the downloading!
plz advice!

3 Likes

What if you try the Semi Automatic Classification Plag-in (SCP) in QGIS, you can download and process sentinel2 data with the plug-in.

1 Like

I use resumable download managers, but almost ever get corrupt files.
Scihub is the only site from which I get download errors, and I use to download many gigabytes a week.

1 Like

I have no problems with downloading using this tool:

I havn’t tried but you might want to consider Amazon WS:


I don’t know if the resulting file structure is compatible with sen2cor. If you try let me know.

3 Likes

Hi @unnic,
Thanks a lot for the reply. as I do not have such enough and good experience with programming . Can I ask you to write in few steps how to use this tool. I mean if I am using cmd windos terminal , what I should do to be able to use this tool and how this will work with cmd ?

Thanks alot, D

@Mussiella,
Thanks for your suggestions, I have not use QGIS before as all my work on ArcMap. However, will consider this as last option as I do not have much time to learn new tools right now.

I assume you have Python up and running (if you installed QGIS or sen2cor it’s there)

in the cmd type:
conda install pycurl
hit enter, then
pip install sentinelsat
enter

then if you input sentinel in the cmd it should return Usage: sentinel [OPTIONS] COMMAND [ARGS]...

On how to use it please see the “Usage” section of the github site.

Hi @unnic, Thanks a lot for your help and time …

I have done this, and then applied the cmd command as below and get this error , have I missed something to do? The id product for the S2 that I wan to download is Mission datatake id: GS2A_20160706T110652_005425_N02.04 …
Plz see below:
C:\Users\Daniel>sentinel download --md5 -u “https://scihub.copernicus.eu/dhus/” Alba xxxx237 GS2A_20160706T110652_005425_N02.04
Traceback (most recent call last):
File “c:\anaconda2\lib\runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “c:\anaconda2\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Anaconda2\Scripts\sentinel.exe_main
.py", line 9, in
File “c:\anaconda2\lib\site-packages\click\core.py”, line 716, in call
return self.main(*args, **kwargs)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 696, in main
rv = self.invoke(ctx)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\anaconda2\lib\site-packages\click\core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “c:\anaconda2\lib\site-packages\sentinelsat\scripts\cli.py”, line 129, in
download
api.download(productid, path, md5)
File “c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py”, line 233, in do
wnload
product = self.get_product_info(id)
File “c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py”, line 201, in ge
t_product_info
geometry_xml = ET.fromstring(product_json[“d”][“ContentGeometry”])
KeyError: ‘d’

C:\Users\Daniel>

That doesn’t look like a valid ID. In the examples the ID looks like this: a9048d1d-fea6-4df8-bedd-7bcb212be12e
You need to define a correct ID. Additionally your username and password are missing.

I search via a .geojson
sentinel search [OPTIONS] <user> <password> <geojson>

Here’s a tool to create a geojson:
http://geojson.io

I might be easier for you to use QGIS plugin @Mussiella suggested

@unnic thanks a lot again for your help and time, really much appreciated!.

One more thing, just once I create the geojson file, How to connected with the sentinelsat tool ? Do I have to put the geojson file in certain path ?

Thanks a lot!
D

the path to the geojson.
e.g:
sentinel search --sentinel2 -s 20160704 guest guest D:\Data\location.json -d

1 Like

Thanks a lot for your help , much appreciated!

Can I use Visual Studio .NET Python?

Hi @unnic
Sorry but just had this error after I managed to run the search and download command , then it just stopped with this error below, Do you have idea any reason why ?

C:\Users\Daniel>sentinel search -d -s 20151219 -c 30 --md5 Alba xxxxx27
C:\Json\AOI.geojson
Error: API returned unexpected response 503 .
Traceback (most recent call last):
File “c:\anaconda2\lib\runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “c:\anaconda2\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Anaconda2\Scripts\sentinel.exe_main
.py", line 9, in
File “c:\anaconda2\lib\site-packages\click\core.py”, line 716, in call
return self.main(*args, **kwargs)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 696, in main
rv = self.invoke(ctx)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\anaconda2\lib\site-packages\click\core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “c:\anaconda2\lib\site-packages\click\core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “c:\anaconda2\lib\site-packages\sentinelsat\scripts\cli.py”, line 91, in
search
corrupt_scenes = api.download_all(path, md5)
File “c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py”, line 268, in do
wnload_all
for product in self.get_products():
File “c:\anaconda2\lib\site-packages\sentinelsat\sentinel.py”, line 114, in ge
t_products
raise ValueError(‘API response not valid. JSON decoding failed.’)
ValueError: API response not valid. JSON decoding failed.

C:\Users\ Daniel >

CNES Sentinel mirror site, named PEPS, is much faster than scihub (probably because it has less users :wink: )

You may get an account here : https://peps.cnes.fr and then download any products you want, the repository is global and updated in real time.

If you want to download the files automatically from the command line, you can use this code :

To use this software, you must accept first peps licence, and for that download a first product manually.

5 Likes

Thank you OHagolle. This is the only place from which I had success downloading the images without data corruption.

Hi @unnic
What if I want to download S2 but for specific granul… any idea what the command should be if I am using sentinelsat. Or if you advice with other options ?

Thanks a lot

Hello,

You can give a try to https://github.com/kraftek/awsdownload to download S2 data from Amazon S3, either full products or specific granules.

Cheers,
Cosmin.

Using ArcMap, you can try https://github.com/EsriDE/ArcGIS-Sentinel2-Download-Tools
When choosing the “Image selection” option (within the Download tool), the download action is restricted to those particular images (bands), and only marked tiles are download (relevant if you are dealing with older multi-tile packages).

i do not use the tool mentioned above anymore.
Here’s the method I prefer now: