Skip to content

matyasrada/sendown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

sendown.py is a command-line tool that helps you download Sentinel-1A or Sentinel-2A data products from the European Space Agency's Scientific Datahub. If you wish to do a tile-based search for Sentinel-2A products You can use this tool to fish into the data product and download only the data of the searched tile.

The tool uses the request HTTP library of Python so the request library is need to be installed.

optional arguments:

  • -h, --help show this help message and exit
  • -v, --version show program's version number and exit
  • -l, --latlon WGS84 point coordinates i.e. Budapest 47.5 19.04
  • -s, --sat Which satellite/platform i.e. S1A or S2A
  • -e, --extent Extent Coordinates xmin ymin xmax ymax i.e. 16.72 45.74 22.21 48.37 for Hungary
  • -t, --tile Sentinel-2A Tile ID i.e. T34TCT for Budapest
  • -d, --dates Date Interval, if not set it only checks that day
  • -u, --username username - SciHub username, if not set it goes as guest by default
  • -o, --odir Output Directory
  • -y, --type Sentinel-1A Product Type i.e. RAW, SLC, GRD
  • -q, --quicklook Downloading quicklooks to the Output Directory

Example 1

At first it asks for your password, queries the available Sentinel-2A products between the two dates for the 47.5 19.04 coordinate. It lists the query result and you can specify which product needs to be downloaded by its number.

python sendown.py -u username -d 2016-01-01 2016-04-20 -l 47.5 19.04 -s S2A -o /data/tmp 
Password: *****
 -- Start querying products by latlon or extent
LatLon :  47.5,19.04
Platform :  Sentinel-2
Date Interval:  2016-01-01 2016-04-20
Product number :  15
No. QUERY RESULT 
1 S2A_OPER_PRD_MSIL1C_PDMC_20160414T030145_R079_V20160413T095322_20160413T095322.SAFE
2 S2A_OPER_PRD_MSIL1C_PDMC_20160412T164529_R036_V20160410T094029_20160410T094029.SAFE
3 S2A_OPER_PRD_MSIL1C_PDMC_20160324T230459_R079_V20160324T095436_20160324T095436.SAFE
4 S2A_OPER_PRD_MSIL1C_PDMC_20160321T155700_R036_V20160321T094426_20160321T094426.SAFE
5 S2A_OPER_PRD_MSIL1C_PDMC_20160315T064850_R079_V20160314T095144_20160314T095144.SAFE
6 S2A_OPER_PRD_MSIL1C_PDMC_20160311T232023_R036_V20160311T094116_20160311T094116.SAFE
7 S2A_OPER_PRD_MSIL1C_PDMC_20160222T212203_R079_V20160203T095601_20160203T095601.SAFE
8 S2A_OPER_PRD_MSIL1C_PDMC_20160214T194017_R079_V20160213T095503_20160213T095503.SAFE
9 S2A_OPER_PRD_MSIL1C_PDMC_20160210T193312_R036_V20160210T094131_20160210T094131.SAFE
10 S2A_OPER_PRD_MSIL1C_PDMC_20160125T202507_R079_V20160124T100753_20160124T100753.SAFE
11 S2A_OPER_PRD_MSIL1C_PDMC_20160121T181553_R036_V20160121T095704_20160121T095704.SAFE
12 S2A_OPER_PRD_MSIL1C_PDMC_20160114T194758_R079_V20160114T100217_20160114T100217.SAFE
13 S2A_OPER_PRD_MSIL1C_PDMC_20160111T204639_R036_V20160111T094922_20160111T094922.SAFE
14 S2A_OPER_PRD_MSIL1C_PDMC_20160104T182030_R079_V20160104T100050_20160104T100050.SAFE
15 S2A_OPER_PRD_MSIL1C_PDMC_20160101T180916_R036_V20160101T095719_20160101T095719.SAFE
* All product
 -- Enter the number of the product(s) you wish to download.
 -- Listed above i.e. 1,2,4
 -- If you need all products than just enter * 
Number(s):

Example 2

If you set the -q option on, the tool will download the quicklook images of the products to your output directory.
It might help deciding whether the product is worth downloading i.e. cloud-free etc.

python sendown.py -u username -d 2016-01-01 2016-04-20 -l 47.5 19.04 -s S2A -o /data/tmp -q

Example 3

python sendown.py -u username -d 2016-01-01 2016-04-20 -t T34TCT -o /data/tmp -q

If you commit a query with the -t, --tile option It will not be necessery to sepcify the satellite type. The tool uses sen2tiles.csv file to to perform the search for the tile. So the sen2tiles.csv file needs to be the same folder as the sendown.py script. After specifing the requested products you got the corresponding bands for the tile to your output directory.

Example 4

python sendown.py -u username -d 2016-01-01 2016-04-20 -l 47.5 19.04 -s S1A -o /data/tmp -q

You can searh for Sentinel-1A products with the obvious S1A argument.
You can the product type for thhe Sentinel-1A product by setting the -y option to GRD or SLC or RAW. Without setting the option It queries all three types.

Example 5

python sendown.py -u username -d 2016-01-01 2016-04-20 -l 47.5 19.04 -s S1A -y GRD -o /data/tmp -q

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages