Discovering and getting Sentinel-2 data in a sandbox from CNR-ISSIA FTP


Terradue is populating the CNR-ISSIA FTP server with Sentinel-2 data over a growing number of Protected Areas.

Discovering the Sentinel-2 products

A simple way to discover Sentinel-2 products is to use the OpenSearch client to query the catalogue.

Let’s say we want to discover the Sentinel-2 products over the Doñana Protected area which has a bounding box expressed with the lower left and top right corners by:


and a Time of Interest of January 2016, the query is constructed with:

opensearch-client \ -p bbox="-6.93,36.65,-6.02,37.47" \ -p start="2016-01-01" \ -p stop="2016-01-31" \ \ enclosure

The last line of the command above instructs the client to return the URLs of the Sentinel-2 products.

The output is:

Now we have all the Sentinel-2 product URLs over the Doñana protected area of January 2016.

Downloading the discovered Sentinel-2 products

Make sure you have an account on the CNR FTP server, you will need that information to download the data.

We will use an FTP client lftp that must be installed on the sandbox with:

sudo yum install -y lftp

We now need to manipulate the Sentinel-2 URLs returned by the opensearch-client to correctly pass these to lftp

First the FTP hostname:

ftp_hostname="$( echo "" | cut -d "/" -f 3- )"

The value is

Then, the product path:

product_path="$( echo "" | cut -d "/" -f 4- )

The value is: /incoming/terradue/sentinel2/2016/01/28/

Now let’s build the request:

lftp -u <username,password> -e "get ${product_path}" ${ftp_hostname}

Wait for the download to complete and process the data!

ECOPOTENTIAL is a large European-funded H2020 project that focuses its activities on a targeted set of internationally recognised Protected Areas, blending Earth Observations from remote sensing and field measurements, data analysis and modelling of current and future ecosystem conditions and services. ECOPOTENTIAL considers cross-scale geosphere-biosphere interactions at regional to continental scales, addressing long-term and large-scale environmental and ecological challenges.