from pystac_client import Client
import stackstac
= 'https://cmr.earthdata.nasa.gov/stac' STAC_URL
= Client.open(f"{STAC_URL}/LPCLOUD") catalog
= catalog.search(
search = ['HLSL30.v2.0', 'HLSS30.v2.0'],
collections = {'type': 'Polygon',
intersects 'coordinates': [[[-101.67271614074707, 41.04754380304359],
-101.65344715118408, 41.04754380304359],
[-101.65344715118408, 41.06213891056728],
[-101.67271614074707, 41.06213891056728],
[-101.67271614074707, 41.04754380304359]]]},
[= '2021-05/2021-08'
datetime )
search.matched()
= search.get_all_items() ic
= list(search.get_items()) il
= [x for x in ic if 'T13TGF' in x.id] tic
import pystac
= pystac.ItemCollection(items=tic) item_collection
item_collection
il
= stackstac.stack(item_collection, assets=['B04', 'B02'], epsg=32613, resolution=30) data
='B04').isel(time=[0]) data.sel(band
import stackstac
import pystac_client
= "https://earth-search.aws.element84.com/v0"
URL = pystac_client.Client.open(URL) catalog
catalog
= catalog.search(
stac_items =dict(type="Point", coordinates=[-105.78, 35.79]),
intersects=["sentinel-s2-l2a-cogs"],
collections="2020-04-01/2020-05-01"
datetime ).get_all_items()
stac_items
= stackstac.stack(stac_items) stack
stack