inst/theia_download/README.md

theia_download

This is a simple piece of code to automatically download the products provided by Theia land data center : https://theia.cnes.fr. It can download the products delivered by Theia, such as the [Sentinel-2 L2A products] (http://www.cesbio.ups-tlse.fr/multitemp/?page_id=6041), Landsat L2A products and the SpotWorldHeritage L1C products.

This code was written thanks to the precious help of one my colleague at CNES Jérôme Gasperi who developped the "rocket" interface which is used by Theia, and the mechanism to get a token. It was then adapted by Dominique Clesse for the new Muscate interface to download Sentinel-2 products.

This code relies on python 2.7 (a new python3 branch was added on the 29th of April) and on the curl utility. Installing curl is therefore a prerequisite. It has been developped and tested on Linux. It might work on windows, but I cannot test it. To use the code, you need to have an account and a password at theia, and you need to add it to the config file as explained in the authentification paragraph.

Examples for various sensors

If you have an account at theia, you may download products using command lines like

which downloads the SENTINEL-2 products above Toulouse, acquired in September 2016.

which downloads the SENTINEL-2 products above Toulouse, acquired in September 2016 with less tha 50% cloud cover

which downloads the LANDSAT-8 products above Toulouse, acquired in September 2016.

which downloads the SPOT World Heritage products above Toulouse, acquired in 2006.

which downloads the Theia snow products above Foix (Pyrenees), acquired in November 2016. The collection option is case sensitive.

As you must have noted, there are two different config files, depending on the whether you are using SENTINEL2 data (config_theia.cfg) , or Landsat or Spot world Heritage data (config_landsat.cfg). This is temporary, due to the start of MUSCATE ground segment, and soon, all the products will accessed with the config_theia.cfg authentification.

Other options

which downloads the SENTINEL-2 products above tile T31TCJ, acquired in September 2016.

which downloads the LANDSAT 8 products above --lon 1 --lat 43.5 (~Toulouse), acquired in November 2015.

which downloads the LANDSAT 8 products in latitude, longitude box around Toulouse, acquired in November 2015.

which downloads the SpotWorldHeritage products acquired by SPOT5 in 2005-2006

which downloads the SENTINEL2 T31TCJ tile, with the relative Orbit Number 51, acquired in 2017.

Authentification

The config file config_landsat.cfg or config_landsat.cfg must contain your email address and your password as in the examples provided.

If you need to go through a proxy, and if you have not configured your proxy variable (export http_proxy=http://moi:secret@proxy.mycompany.fr:8050), you may also use one of the files like config_theia_proxy.cfg or config_landsat_proxy.cfg and add your passwords in them.

The program first fetches a token using your email address and password, and then uses it to download the products. As the token is only valid for two hours, it is advised to request only a reasonable number of products. It is necessary to make a first download from the site manually in order to validate your accound and the licence in the case of SpotWorldHeritage.



pobsteta/theia2r documentation built on May 25, 2019, 2:21 p.m.