Skip to content

Commit 23685ab

Browse files
authored
Merge pull request #58 from earthdaily/dev
v0.0.15
2 parents a9d1509 + 99217d6 commit 23685ab

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.0.15] - 2024-04-11
8+
9+
### Fixed
10+
11+
- `ag_cloud_mask_items` queries items per batch.
12+
13+
714
## [0.0.14] - 2024-04-11
815

916
### Fixed

earthdaily/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# to hide warnings from rioxarray or nano seconds conversion
66
warnings.filterwarnings("ignore")
77

8-
__version__ = "0.0.14"
8+
__version__ = "0.0.15"

earthdaily/earthdatastore/__init__.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ def datacube(
650650

651651
if intersects is not None:
652652
intersects = cube_utils.GeometryManager(intersects).to_geopandas()
653+
self.intersects = intersects
653654
items = self.search(
654655
collections=collections,
655656
bbox=bbox,
@@ -941,8 +942,17 @@ def ag_cloud_mask_from_items(items):
941942
if len(items_id) == 0:
942943
raise ValueError("Sorry, no ag_cloud_mask available.")
943944
collections = list(items_id.keys())
944-
ids = [x for n in (items_id.values()) for x in n]
945-
return self.search(collections=collections, ids=ids)
945+
ids_ = [x for n in (items_id.values()) for x in n]
946+
items_list = []
947+
step = 100
948+
for items_start_idx in range(0, len(ids_), step):
949+
items = self.search(
950+
collections=collections,
951+
intersects=self.intersects,
952+
ids=ids_[items_start_idx : items_start_idx + step],
953+
)
954+
items_list.extend(items)
955+
return ItemCollection(items)
946956

947957

948958
def item_property_to_df(

0 commit comments

Comments
 (0)