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

Use pgstac api to get item rather than direct query #50

Merged
merged 7 commits into from
Apr 5, 2022

Conversation

bitner
Copy link
Contributor

@bitner bitner commented Apr 4, 2022

In PGStac 0.5.0, the data stored in the items table is compressed by removing information that is stored at the collections level. Directly querying the items table will only return part of the json. By using the get_item function, it will return the fully hydrated item feature.

@vincentsarago
Copy link
Member

This doesn't seems to be compatible with <0.5.0. Let's wait for it to be released then

@vincentsarago
Copy link
Member

@bitner Would it be the same (performance wise) to use the search function, so we can support pgstac<0.5.0?

@bitner
Copy link
Contributor Author

bitner commented Apr 4, 2022

Yes, the only difference being that using search will return a Feature collection with a single feature - the advantage of using search is that you could also use the fields extension if there was only limited information that you needed from the item. I can tweak the PR.

@vincentsarago
Copy link
Member

👍 let's use the search function then. No need to add more complexity with the field extension, the idea is to get the full item

@vincentsarago
Copy link
Member

🙏 thanks @bitner

@vincentsarago vincentsarago merged commit 1a5fa18 into stac-utils:master Apr 5, 2022
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

Successfully merging this pull request may close these issues.

2 participants