Skip to content

Commit

Permalink
update catalog api call
Browse files Browse the repository at this point in the history
  • Loading branch information
zigaLuksic committed Oct 6, 2022
1 parent 1fe1cfa commit 2a59c7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ numpy>=1.13.3
scipy>=0.19.1
scikit-image>=0.13.0
lightgbm>=2.0.11
sentinelhub>=3.4.2
sentinelhub>=3.8.0
8 changes: 4 additions & 4 deletions s2cloudless/sentinelhub_masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
data_folder=None,
data_collection=DataCollection.SENTINEL2_L1C,
config=None,
**kwargs
**kwargs,
):
"""
:param cloud_detector: An instance of a cloud detector object
Expand Down Expand Up @@ -110,7 +110,7 @@ def _prepare_api_requests(self):
SentinelHubRequest.input_data(
data_collection=self.data_collection,
time_interval=(timestamp - self.time_difference, timestamp + self.time_difference),
**self.kwargs
**self.kwargs,
)
],
responses=[
Expand Down Expand Up @@ -153,13 +153,13 @@ def _get_timestamps_from_catalog(self, time_interval):

cloud_cover_query = None
if self.maxcc is not None:
cloud_cover_query = {"eo:cloud_cover": {"lt": 100 * float(self.maxcc)}}
cloud_cover_query = f"eo:cloud_cover < {100 * float(self.maxcc)}"

search_iterator = catalog.search(
self.data_collection,
bbox=self.bbox,
time=time_interval,
query=cloud_cover_query,
filter=cloud_cover_query,
fields={
"include": [
"properties.datetime",
Expand Down

0 comments on commit 2a59c7f

Please sign in to comment.