Skip to content

Selecting satellites from landsat-c2-l2 collection #70

Discussion options

You must be logged in to vote

You can use the in operator to filter to specific platforms using the STAC query extension. Our example notebook now includes a section demonstrating this with pystac-client.

Using pystac-client that would be

import pystac_client

catalog = pystac_client.Client.open('https://planetarycomputer.microsoft.com/api/stac/v1')
search = catalog.search(
    collections=['landsat-c2-l2'],
    datetime="2022-02-01/2022-03-01",
    query={"platform": {"in": ["landsat-8", "landsat-9"]}},
)

next(search.get_items())

All the items returned in the search iterable will be from landsat-8 or landsat-9.

(orignal post below)


Agreed that a tutorial would be helpful here. I'm waiting for a couple of things to …

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@cullen-molitor
Comment options

@TomAugspurger
Comment options

Answer selected by cullen-molitor
Comment options

You must be logged in to vote
1 reply
@TomAugspurger
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TomAugspurger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants