Download data from a catalogue query


#1

Every entry in an index of the catalogue can have a link to the data that it describes.
There is a resource location (URL), also called enclosure, that can be associated in the entry metadata.
This URL can be extracted easily using opensearch-client. For instance:

opensearch-client "https://catalog.terradue.com/sentinel1/search" enclosure

The resource locations returned by the catalogue point to a data gateway like:
https://store.terradue.com/download/sentinel1/files/v1/S1A_IW_SLC__1SDH_20160915T090555_20160915T090624_013061_014B4B_4793

then the download will be performed via the Data Gateway that enables many function such as caching to allow the best download performance of the data requested.
Now you can use the download url with a simple curl command

curl -v -L -o <your_download_path> <enclosure_url>

i.e.

curl -v -L -o /tmp/S1A_IW_SLC__1SDH_20160915T090555_20160915T090624_013061_014B4B_4793.zip https://store.terradue.com/download/sentinel1/files/v1/S1A_IW_SLC__1SDH_20160915T090555_20160915T090624_013061_014B4B_4793

or using one of the ciop-copy tool installed in your sandbox:

ciop-copy -s -U -O <your_download_path> <enclosure_url>

i.e.

ciop-copy -s -U -O /tmp/ https://store.terradue.com/download/sentinel1/files/v1/S1A_IW_SLC__1SDH_20160915T090555_20160915T090624_013061_014B4B_4793

you can even pipe the query and download request

opensearch-client "https://catalog.terradue.com/sentinel1/search" enclosure | ciop-copy -s -U -O /tmp/

more information on download in the Data API documentation.