microsoft / PlanetaryComputerExamples

Examples of using the Planetary Computer
MIT License
377 stars 184 forks source link

Inaccessibility of Aqua Snow Cover Daily Product with id "MYD10A1 " #168

Closed aftabhunzai closed 2 years ago

aftabhunzai commented 2 years ago

Hi, Your example is working fine with Terra product. I tried to access Aqua Snow Cover Daily product with its id "MYD10A1" but it is not accessible. Are you going to add this product in near future? I used your example but it is not working:

for datetime in datelist:
    print(f"Fetching {datetime}")
    search = catalog.search(
        collections=["modis-MYD10A1-061"],
        intersects=location,
        datetime=str(datetime),
    )
    item_aq = search.get_all_items()[0]
    items_aq[datetime] = planetary_computer.sign(item_aq)

print(items_aq)
TomAugspurger commented 2 years ago

Looking at our catalog it looks like the STAC collection ID is modis-10A1-061. Can you try that?

aftabhunzai commented 2 years ago

Thanks, I got it through following code: it is not mentioned in example: item_terra = search.get_all_items()[1]

TomAugspurger commented 2 years ago

Good to know you worked it out. In general, you could use item.platform to find which platform the item came from. And you can query for aqua specifically in the STAC API with .search(..., query={"platform": {"eq": "aqua"}}).