Skip to content
Cosmin Cara edited this page Aug 23, 2017 · 7 revisions

ProductDownload Wiki

Command Line Parameters Reference

  • -o/--out : The folder in which the products will be downloaded. It is created if it doesn't exist. The parameter is mandatory. This option is exclusive with -i/--input.
  • -i/--input : The folder in which the products are to be inspected (offline mode). The parameter is mandatory. This option is exclusive with -o/--out.
  • -a/--area <lon1,lat1 lon2,lat2 ...>: A closed polygon whose vertices are given in <lon,lat> pairs, space-separated. Can be omitted if a list of product names is supplied. This option is exclusive with -af/--areafile.
  • -af/--areafile : A file containing a closed polygon whose vertices are given in pairs, comma-separated. Can be omitted if a list of product names is supplied. This option is exclusive with -a/--area
  • -cp,--cloudpercentage : The threshold for cloud coverage of the products. Below this threshold, the products will be ignored. Defaults to 30 if omitted.
  • -p/--products <product1 product2 ...>: The list of S2 product names to be downloaded, space-separated. This option is exclusive with -pf/--productfile
  • -pf/--productfile : A file containing the list of S2 product names to be downloaded, space-separated. This option is exclusive with -p/--products.
  • -uuid/--uuid <uuid1 uuid2 ...>: A list of S2 product unique identifiers, as retrieved from SciHub, space-separated.
  • -t/--tiles <tileid1 tileid2 ...>: A list of S2 tile IDs to be downloaded, space-separated. Only these tiles will be downloaded from the intersecting products. This option is exclusive with -tf/--tilefile.
  • -tf/--tilefile : A file containing the list of S2 tile IDs to be downloaded, space-separated. This option is exclusive with -t/--tiles.
  • -start/--startdate : The start acquisition date of the products to look for. If not specified, defaults to the current date -7 days.
  • -end/--enddate : The end acquisition date of the products to look for. If not specified, defaults to the current date.
  • -l/--limit : The maximum number of products returned. If not specified, defaults to 10.
  • -z/--zip: Instructs the tool to compress each of the downloaded products into a zip archive.
  • -d/--delete: Used together with -z/--zip, deletes the product folders after compression.
  • -s/--store <AWS|SCIHUB|LOCAL>: The store of products from which to download products. If not specified, defaults to SCIHUB. LOCAL should be used only if you are using a local product archive.
  • -ma/--ma <NONE|NAN|INTERPOLATE>: Fill-in the missing angles grids (if absent) following one of the methods: NONE (no change), NAN (fill with NaN), INTERPOLATE (interpolate values).
  • -ro/--relative.orbit: The relative orbit number.
  • -u/--unpacked: Download unpacked products (applies to SciHub only).
  • -user/--user : User account to connect to SciHub.
  • -pwd/--password : The password of the account to connect to SciHub.
  • -phost/--proxy.host : The proxy host to be used (if behind a proxy).
  • -pport/--proxy.port : The proxy port.
  • -puser/--proxy.user : The user to connect to the proxy. If no authentication required, it should be omitted.
  • -ppwd/--proxy.password : The password to connect to the proxy. If no authentication required, it should be omitted.
  • -ptype/--proxy.type <http|socks>: The proxy type.
  • -aws/--aws: Perform the search directly into AWS bucket (slower, but doesn't go through SciHub).
  • -v/--verbose: Produces verbose output/logs.
  • -sen/--sensor <S2|L8> The sensor (product) type. Supported values are S2 or L8. Default is S2
  • -b/--bands <band1 band2 ...>: The list of S2/L8 band names, space-separated, to be downloaded
  • -s2t/--s2pt <S2MSI1C|S2MSI2Ap>: Sentinel-2 product type. Default is S2MSI1C
  • -l8col/--l8col <PRE|C1> Landsat 8 collection to be queried. Default is C1
  • -l8t/--l8pt <RT|T1|T2> Landsat 8 product type
  • -q/--query Only perform query and return product names in a file named 'results.txt'
  • -pre/--preops Search for Sentinel-2B products in the Pre-Operational Hub
  • -m/--mode <OVERWRITE|RESUME|COPY|SYMLINK> The mode of fetching or downloading products. Default is OVERWRITE (which implies download)

Usage examples

Offline mode

java -jar ProductDownload.jar --input /home/productfolder --ma NAN

Online mode

java -jar ProductDownloader.jar --user <scihub_user> --password <scihub_pwd> --out /home/download --tiles 32UQU --ma NAN --products S2A_OPER_PRD_MSIL1C_PDMC_20160318T235357_R022_V20150803T101010_20150803T101010 --store AWS

More examples can be found in the unit tests.

Clone this wiki locally