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

Switch examples back to satsearch #80

Merged
merged 1 commit into from
Oct 28, 2021
Merged

Switch examples back to satsearch #80

merged 1 commit into from
Oct 28, 2021

Conversation

gjoseph92
Copy link
Owner

Until stac-utils/pystac#546 is resolved, pystac is very painful to use, so I'd rather not have it be the lead example.

Partially Revert "Fix for Pystac ItemCollections (#69)"

This reverts commit 98809b4.

Until stac-utils/pystac#546 is resolved, pystac is very painful to use, so I'd rather not have it be the lead example.

Partially Revert "Fix for Pystac ItemCollections (#69)"

This reverts commit 98809b4.
@gjoseph92 gjoseph92 merged commit 4ba90f4 into main Oct 28, 2021
@gjoseph92 gjoseph92 deleted the back-to-satsearch branch October 28, 2021 05:33
@TomAugspurger
Copy link
Contributor

FYI I don't think satsearch is being developed anymore. I think it's best for everyone to focus on pystac-client. I believe that @duckontheweb has some time set aside for pystac development coming up.

That said, what versions of pystac & pystac-client are you using? I just reran the example from stac-utils/pystac#546 (comment), and and everything seems OK:

%%time
catalog = pystac_client.Client.open("https://planetarycomputer.microsoft.com/api/stac/v1")
items = catalog.search(
    intersects=dict(type="Point", coordinates=[-106, 35.7]),
    collections=["sentinel-2-l2a"],
    datetime="2019-01-01/2020-01-01"
).get_all_items()

CPU times: user 154 ms, sys: 15 ms, total: 169 ms
Wall time: 1.68 s

and to_dict()

%%time
dict_items = [item.to_dict() for item in items]
CPU times: user 46.4 ms, sys: 402 µs, total: 46.8 ms
Wall time: 44.8 ms

This is with psytac=1.1.0 and pystac-client=0.3.0

@gjoseph92
Copy link
Owner Author

Thanks! I hadn't tried updating, but that solves it. I'm glad; I really didn't want to do this (just meant as a stopgap until that issue was fixed). I'll revert this PR and bump the requirements.

gjoseph92 added a commit that referenced this pull request Oct 29, 2021
Reverts #80, and corrects a couple errors in #69
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.

None yet

2 participants