Skip to content

Searching for Collections that Don't Exist Times Out/Takes a Very Long Time #392

@alexgleith

Description

@alexgleith

The Harmomised Landsat and Sentinel-2 Collections changed their names, and I didn't realise that.

Code that used to work quickly, not took 10s of minutes to perhaps not complete.

Example code:

from pystac.client import Client
from odc.geo import BoundingBox

catalog = Client.open("https://cmr.earthdata.nasa.gov/cloudstac/LPCLOUD/")

# Bounding box over western Tasmania
bbox = BoundingBox(145.0, -43.0, 146.3, -42.0, crs="EPSG:4326")

# Simpler search across two collections
items = catalog.search(
    collections=["HLSS30_v2.0"],
    bbox=list(bbox),
    datetime="2025-04",
).item_collection()

print(f"Found {len(items)} items")

Note that the collection should be HLSS30_2.0.

When working right, with the correct name, this query takes about 7 seconds. With the incorrect name, it would take over 5 minutes before I'd kill it.

I think that this API should handle incorrect/non-existent collection names by rapidly returning 0 items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions