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

Update pystac-client return methods. #7

Closed
sharkinsspatial opened this issue Apr 13, 2023 · 3 comments
Closed

Update pystac-client return methods. #7

sharkinsspatial opened this issue Apr 13, 2023 · 3 comments
Assignees

Comments

@sharkinsspatial
Copy link
Member

sharkinsspatial commented Apr 13, 2023

get_all_items is now deprecated and should be replaced https://pystac-client.readthedocs.io/en/stable/api.html#pystac_client.ItemSearch.items.
https://app.reviewnb.com/developmentseed/asdi-examples/blob/main/examples%2Fcop-dem-glo-30-stac-access.ipynb

@wildintellect
Copy link
Contributor

adding reference from @sharkinsspatial to look at https://github.com/aws/studio-lab-examples for managing conda envs

@wildintellect
Copy link
Contributor

I'm actually a tad lost on this conversation stac-utils/pystac-client#237
It seems get_all_items was deprecated but then item_collection was added back, and functionally is a drop in replacement. https://github.com/stac-utils/pystac-client/blob/69c3bdf6f79cfca697d32518873e0f57c217cddd/pystac_client/item_search.py#L745
But the intent of this ticket I think was to switch to items which is an iterator then that's a little different.
Based on the ticket above, I think best practices would imply adding a max_items to the request, but I'm open to being convinced to use the iterator.

@wildintellect
Copy link
Contributor

Went with item_collection and max_items for now.

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

2 participants