Skip to content

Commit

Permalink
Update sat-search to 0.3.0, and change constructor calls accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
plant99 committed May 1, 2021
1 parent f326ced commit 85170bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions felicette/sat_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ def search_satellite_data(coordinates, cloud_cover_lt, product="landsat"):
product: landsat, sentinel
"""
if product == "landsat":
product = "landsat-8-l1"
product = "landsat-8-l1-c1"
elif product == "sentinel":
product = "sentinel-2-l1c"
product = "sentinel-s2-l1c"

search = Search(
url="https://earth-search.aws.element84.com/v0",
bbox=get_tiny_bbox(coordinates),
query={
"eo:cloud_cover": {"lt": cloud_cover_lt},
"collection": {"eq": product},
},
sort=[{"field": "eo:cloud_cover", "direction": "asc"}],
collections=[product]
)

# improvement: filter by date, cloud cover here
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
click==7.1.2
requests==2.24.0
sat-search==0.2.3
sat-search==0.3.0
rich==3.3.2
tqdm==4.48.0
rasterio==1.1.5
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
dependencies = [
"click==7.1.2",
"requests==2.24.0",
"sat-search==0.2.3",
"sat-search==0.3.0",
"rich==3.3.2",
"tqdm==4.48.0",
"rasterio==1.1.5",
Expand Down

0 comments on commit 85170bb

Please sign in to comment.