-
Notifications
You must be signed in to change notification settings - Fork 0
/
sentinel_data_download
19 lines (16 loc) · 928 Bytes
/
sentinel_data_download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt, make_path_filter
from datetime import date
# connect to the API
api = SentinelAPI('your_username', 'your_passwrd', 'https://apihub.copernicus.eu/apihub')
# search by polygon, time, and Hub query keywords
footprint = geojson_to_wkt(read_geojson('/path/to/map.geojson'))
products = api.query(footprint,
date = ('20210115', date(2021, 2, 10)), # it's just an example
platformname = 'Sentinel-1',
relativeorbitnumber = 93,
orbitdirection = 'descending', # it can be 'ascending' too .
polarisationmode = 'VV',
producttype = 'SLC')
path_filter = make_path_filter("*s1?-iw1-slc-vv-*.*") # it can be iw[123] for the whole area.
# download all results from the search
api.download_all(products, nodefilter=path_filter)