Skip to content

How to search for any Landsat TM dataset #1000

Answered by wildintellect
pahbs asked this question in Data
Discussion options

You must be logged in to vote

@pahbs

Looks like they changed the server url:

from pystac_client import Client
catalog = "https://landsatlook.usgs.gov/stac-server"
cat = Client.open(catalog)
for collection in cat.get_all_collections():
    print(collection)
#... take the collection name and use below

# Filter by platform
query = {
    "platform": {"eq": "LANDSAT_5"}
}


# can also add bbox, and datetime ranges here
results = cat.search(
    collections='landsat-c2l2-sr',
    max_items=10,
    query=query
)

for item in results.items():
    pri…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pahbs
Comment options

@wildintellect
Comment options

Answer selected by wildintellect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants