Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic search example not working #160

Open
MartinSchobben opened this issue Mar 7, 2024 · 0 comments
Open

Dynamic search example not working #160

MartinSchobben opened this issue Mar 7, 2024 · 0 comments

Comments

@MartinSchobben
Copy link

There seems to be a discrepancy between intake-stac documentation examples on readthedocs and GitHub. The example explaining how STAC items are searched based on a query is different between those sources, where the former works with satsearchand the latter with pystac-client. Perhaps the former is outdated or the latter merely a development version. However none of these examples seem to work with the following package latest versions:

import satsearch
print(satsearch.__version__)
0.3.0
import intake
print(intake.__version__)
2.0.3
import intake_stac
print(intake_stac.__version__)
0.4.0
import pystac_client
print(pystac_client.__version__)
0.7.6

satsearch example

URL='https://earth-search.aws.element84.com/v0'

results = satsearch.Search.search(
    url=URL,
    collections=['landsat-8-l1-c1'],
    bbox=[43.16, -11.32, 43.54, -11.96]
    )
items = results.items()
catalog = intake.open_stac_item_collection(items)
list(catalog)
ValueError: Expected <class 'pystac.item_collection.ItemCollection'> instance, got: <class 'satstac.itemcollection.ItemCollection'>

pystac_client example

import pystac_client
URL = "https://earth-search.aws.element84.com/v0"
catalog = pystac_client.Client.open(URL)

results = catalog.search(
    collections=["sentinel-s2-l2a-cogs"],
    bbox = [35.48, -3.24, 35.58, -3.14],
    datetime="2020-07-01/2020-08-15")

items = results.get_all_items()
catalog = intake.open_stac_item_collection(items)
list(catalog)
DoesNotConformTo: Server does not conform to ITEM_SEARCH, There is no fallback option available for search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant