Skip to content

Commit

Permalink
Merge pull request #58 from earthdaily/dev
Browse files Browse the repository at this point in the history
v0.0.15
  • Loading branch information
nkarasiak authored Apr 11, 2024
2 parents a9d1509 + 99217d6 commit 23685ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.15] - 2024-04-11

### Fixed

- `ag_cloud_mask_items` queries items per batch.


## [0.0.14] - 2024-04-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion earthdaily/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# to hide warnings from rioxarray or nano seconds conversion
warnings.filterwarnings("ignore")

__version__ = "0.0.14"
__version__ = "0.0.15"
14 changes: 12 additions & 2 deletions earthdaily/earthdatastore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ def datacube(

if intersects is not None:
intersects = cube_utils.GeometryManager(intersects).to_geopandas()
self.intersects = intersects
items = self.search(
collections=collections,
bbox=bbox,
Expand Down Expand Up @@ -941,8 +942,17 @@ def ag_cloud_mask_from_items(items):
if len(items_id) == 0:
raise ValueError("Sorry, no ag_cloud_mask available.")
collections = list(items_id.keys())
ids = [x for n in (items_id.values()) for x in n]
return self.search(collections=collections, ids=ids)
ids_ = [x for n in (items_id.values()) for x in n]
items_list = []
step = 100
for items_start_idx in range(0, len(ids_), step):
items = self.search(
collections=collections,
intersects=self.intersects,
ids=ids_[items_start_idx : items_start_idx + step],
)
items_list.extend(items)
return ItemCollection(items)


def item_property_to_df(
Expand Down

0 comments on commit 23685ab

Please sign in to comment.