coffing的个人博客分享 http://blog.sciencenet.cn/u/coffing

博文

[转载]Sentinel-2 批量下载方法(亲测可用)

已有 9215 次阅读 2019-3-14 17:33 |个人分类:小程序&小工具|系统分类:科研笔记|文章来源:转载

原文网址:

http://www.un-spider.org/links-and-resources/data-sources/batch-download-sentinel



How to batch download Sentinel data

Map of tiles for example batch download (Credit USGS)

The availability of recent, high resolution and free data sources with the sentinel missions drive the increased use of sentinel images for disaster mapping. For some analyses such as droughts, images of many different time points are necessary or large areas are covered. 

However, on the Copernicus Scihub only two satellite images can be downloaded simultaneously.  Therefore, when a large number of images needs to be downloaded a bulk download is often desired. There are multiple options for batch downloading sentinel data by using computer programs such as cURL, Wget or aria2 or by using download managers. 

Additionally, batch downloading options may vary for the host sites (Copernicus Open Data HubPEPSCODE-DEUSGS), however, the principle is similar. Here we present the process for aria2 batch downloading.

#1 Acquire Sentinel Data on Scihub Copernicus

  1. Registration

  2. Search for Sentinel datasets and add them to the Download Cart (https://scihub.copernicus.eu/userguide/2GraphicalUserInterface)

  3. By clicking on "Download Cart" a .meta4 file including the URLs is created and will be saved in Downloads as product.meta4

Note: only a maximum of 50 products are inserted in the file, it is therefore recommended to not fill the cart with more than 50, but rather do a second run if needed

#2 Run Batch Download with aria2 (command-line download utility)

  1. Install aria2 (https://aria2.github.io/) and unzip the folder

  2. Move the product.meta4 file into the aria2 folder (probably C:\Users\Downloads\aria2-1.34.0-win-64bit-build1)

  3. Open the Command Prompt

  4. Set the Working Directory to the aria2 folder where also your .meta4 file is located (type “cd” followed by the file path)

  5. Use aria2 in Command Promt – type:

aria2c --http-user="your username" --http-passwd="your password" --check-certificate=false --max-concurrent-downloads=2 -M products.meta4

    6. press Enter and the bulk download will run and save the datasets in the aria2 folder

Note: Do not delete the images in the Download Cart while the Bulk Download is still running

Command prompt example

The command prompt should look similar to this:

C:\Users\yourusername>cd C:\Users\yourusername\Downloads\aria2-1.34.0-win-64bit-build1
C:\Users\yourusername\Downloads\aria2-1.34.0-win-64bit-build1> aria2c --http-user="your username" --http-passwd="your password" --check-certificate=false --max-concurrent-downloads=2 -M products.meta4

Note: The errorCode=24 Authorization failed occurs when you are missing the " " around the user or password, or have addition signs such as {} around them as presented on some websites.




https://blog.sciencenet.cn/blog-313493-1167533.html

上一篇:Landsat8 OLI逐像元成像几何计算
下一篇:Windows下调用自动匹配Python包arosics的注意事项

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2021-12-2 11:45

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部