From b150118173eb6a84b74d2d7868070ac1faa4d9d0 Mon Sep 17 00:00:00 2001 From: Kirill Kouzoubov Date: Tue, 19 Dec 2023 13:38:00 +1100 Subject: [PATCH] Update example notebooks * query.get_items() -> query.items() * query.get_all_items_as_dict() -> query.item_collection_as_dict() --- notebooks/stac-load-S2-deafrica.py | 4 ++-- notebooks/stac-load-S2-ms.py | 2 +- notebooks/stac-load-e84-aws.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notebooks/stac-load-S2-deafrica.py b/notebooks/stac-load-S2-deafrica.py index ed449e04..6c9f4fcf 100644 --- a/notebooks/stac-load-S2-deafrica.py +++ b/notebooks/stac-load-S2-deafrica.py @@ -26,7 +26,7 @@ # %% from pystac_client import Client -from odc.stac import stac_load, configure_rio +from odc.stac import configure_rio, stac_load # %% [markdown] # ## Set Collection Configuration @@ -124,7 +124,7 @@ ) # Search the STAC catalog for all items matching the query -items = list(query.get_items()) +items = list(query.items()) print(f"Found: {len(items):d} datasets") # %% [markdown] diff --git a/notebooks/stac-load-S2-ms.py b/notebooks/stac-load-S2-ms.py index 0a0005f4..2cb10f3d 100644 --- a/notebooks/stac-load-S2-ms.py +++ b/notebooks/stac-load-S2-ms.py @@ -79,7 +79,7 @@ query={"s2:mgrs_tile": dict(eq="06VVN")}, ) -items = list(query.get_items()) +items = list(query.items()) print(f"Found: {len(items):d} datasets") # %% [markdown] diff --git a/notebooks/stac-load-e84-aws.py b/notebooks/stac-load-e84-aws.py index 3263d897..c6a9bcff 100644 --- a/notebooks/stac-load-e84-aws.py +++ b/notebooks/stac-load-e84-aws.py @@ -26,7 +26,7 @@ import folium.plugins import geopandas as gpd import shapely.geometry -from IPython.display import HTML, display +from IPython.display import display from pystac_client import Client from odc.stac import configure_rio, stac_load @@ -71,11 +71,11 @@ def convert_bounds(bbox, invert_y=False): collections=["sentinel-2-l2a"], datetime="2021-09-16", limit=100, bbox=bbox ) -items = list(query.get_items()) +items = list(query.items()) print(f"Found: {len(items):d} datasets") # Convert STAC items into a GeoJSON FeatureCollection -stac_json = query.get_all_items_as_dict() +stac_json = query.item_collection_as_dict() # %% [markdown] # ## Review Query Result