ost.s1.search

Based on a set of search parameters the script will create a query on www.scihub.copernicus.eu and return the results either as shapefile, sqlite, or write to a PostGreSQL database.

Functions:

gdfInv2Pg:

writes the search result into a PostGreSQL/PostGIS Database

gdfInv2Sqlite: (tba)

writes the search result into a SqLite/SpatiaLite Database

Main function

scihubSearch:

handles the whole search process, i.e. login, query creation, search and write to desired output format

Contributors

Andreas Vollrath, ESA phi-lab

August 2018: Original implementation

Usage

python3 search.py -a /path/to/aoi-shapefile.shp -b 2018-01-01 -e 2018-31-12

-t GRD -m VV -b IW -o /path/to/search.shp

-a

defines ISO3 country code or path to an ESRI shapefile

-s

defines the satellite platform (Sentinel-1, Sentinel-2, etc.)

-b

defines start date*

-e

defines end date for search*

-t

defines the product type (i.e. RAW,SLC or GRD)*

-m

defines the polarisation mode (VV, VH, HH or HV)*

-b

defines the beammode (IW,EW or SM)*

-o

defines output that can be a shapefile (ending with .shp), a SQLite DB (ending with .sqlite) or a PostGreSQL DB (no suffix)

-u

the scihub username*

-p

the scihub secret password*

  • optional, i.e will look for all available products as well as ask for username and password during script execution

Functions

check_availability

This function checks if the data is already downloaded or

scihub_catalogue

This is the main search function on scihub

ost.s1.search.check_availability(inventory_gdf, download_dir, data_mount)[source]
This function checks if the data is already downloaded or

available through a mount point on DIAS cloud

Parameters
  • inventory_gdf

  • download_dir

  • data_mount

Returns

ost.s1.search.scihub_catalogue(query_string, output, append=False, uname=None, pword=None, base_url='https://apihub.copernicus.eu/apihub')[source]

This is the main search function on scihub

Parameters
  • query_string

  • output

  • append

  • uname

  • pword

  • base_url

Returns