-
Notifications
You must be signed in to change notification settings - Fork 54
Description
The Client.get_items
function may get items using the /search
endpoint if the server conforms to the ITEM_SEARCH
conformance class.
If it does so, the search is always recursive (looks for items in sub-catalogs and sub-collections) even if the recursive=False
argument is passed.
I would expect that it would make a non-recursive search instead and only return items that are the immediate child of the current catalog.
Note that the spec recommends that items have a collection as a parent (not a catalog) but catalog parents of items are supported:
- https://github.com/radiantearth/stac-spec/blob/ec002bb93dbfa47976822def8f11b2861775b662/commons/links.md?plain=1#L103
- https://github.com/radiantearth/stac-spec/blob/ec002bb93dbfa47976822def8f11b2861775b662/catalog-spec/catalog-spec.md?plain=1#L74-L75
Additionally, some APIs require that the collections
argument be used when using the /search
endpoint. This means that this
pystac-client/pystac_client/client.py
Line 460 in 5fae268
search = self.search(ids=ids) |
will always raise an APIError
for these APIs. This is notably the case for the STAC API at https://planetarycomputer.microsoft.com/api/stac/v1/ which is used in the tests for pystac-client.