Skip to content

Commit 2a59c7f

Browse files
committed
update catalog api call
1 parent 1fe1cfa commit 2a59c7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ numpy>=1.13.3
22
scipy>=0.19.1
33
scikit-image>=0.13.0
44
lightgbm>=2.0.11
5-
sentinelhub>=3.4.2
5+
sentinelhub>=3.8.0

s2cloudless/sentinelhub_masking.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
data_folder=None,
4242
data_collection=DataCollection.SENTINEL2_L1C,
4343
config=None,
44-
**kwargs
44+
**kwargs,
4545
):
4646
"""
4747
:param cloud_detector: An instance of a cloud detector object
@@ -110,7 +110,7 @@ def _prepare_api_requests(self):
110110
SentinelHubRequest.input_data(
111111
data_collection=self.data_collection,
112112
time_interval=(timestamp - self.time_difference, timestamp + self.time_difference),
113-
**self.kwargs
113+
**self.kwargs,
114114
)
115115
],
116116
responses=[
@@ -153,13 +153,13 @@ def _get_timestamps_from_catalog(self, time_interval):
153153

154154
cloud_cover_query = None
155155
if self.maxcc is not None:
156-
cloud_cover_query = {"eo:cloud_cover": {"lt": 100 * float(self.maxcc)}}
156+
cloud_cover_query = f"eo:cloud_cover < {100 * float(self.maxcc)}"
157157

158158
search_iterator = catalog.search(
159159
self.data_collection,
160160
bbox=self.bbox,
161161
time=time_interval,
162-
query=cloud_cover_query,
162+
filter=cloud_cover_query,
163163
fields={
164164
"include": [
165165
"properties.datetime",

0 commit comments

Comments
 (0)