-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add a StacCollection.search
method
#95
Comments
This sounds great @TomAugspurger! I personally don't see any good reason to avoid overriding the base class search method but we should ask @martindurant for his thoughts. |
Please do make specialised versions of search(), the one in Catalog is super-simplistic and only meant to be a fallback when nothing better is available. |
@TomAugspurger I really like this idea, but it would need some docs / error handling for the cases that "rel":"search" doesn't exist. I'm thinking of the case of a static catalog/collection, where there is no API endpoint. For that case we could:
|
I do rather like the idea of being able to do a search on a static catalog, but that seems like it should be implemented in pystac-client as well (which is named as such as it's a client for both static catalogs and APIs). Currently pystac-client will raise an APIError if there is no rel=search link |
I have done a bit of work putting together an implementation of pystac-client style search for static catalogs. This work lives in https://github.com/jsignell/stac-static it could be possible to delegate search to that library. The main limitation is that it depends on having a geodataframe version of the stac metadata though. |
I am not in a good position to reckon how much of a limitation that is. |
Purely as a convenience, it'd be nice to have a
StacCollection.search
method that usespystac-client
to search an endpoint with a specific collection.The
.search
method would use pystac-clientlink
with a"rel": "search"
. Set that as the endpointcollections=[self.id]
, to limit the search to just that collection.I see now that intake's base Catalog class apparently defines a
search
method, which appears to do some kind of text-based search on the items. I suspect that most STAC users would expect search to behave like STAC search.The text was updated successfully, but these errors were encountered: