Skip to content

Commit

Permalink
Update example notebooks
Browse files Browse the repository at this point in the history
* query.get_items() -> query.items()
* query.get_all_items_as_dict() -> query.item_collection_as_dict()
  • Loading branch information
Kirill888 committed Dec 19, 2023
1 parent 3936d6c commit b150118
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions notebooks/stac-load-S2-deafrica.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion notebooks/stac-load-S2-ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions notebooks/stac-load-e84-aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b150118

Please sign in to comment.