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

Removing Duplicates at the Stac Level? #51

Open
J6767 opened this issue Aug 30, 2024 · 0 comments
Open

Removing Duplicates at the Stac Level? #51

J6767 opened this issue Aug 30, 2024 · 0 comments

Comments

@J6767
Copy link

J6767 commented Aug 30, 2024

Running a pystac query as follows includes duplicate products:

def pystac_query(collection, max_items, time_range, lon, lat, max_cloud):
    client = Client.open("https://earth-search.aws.element84.com/v1") 

    query = client.search(
        max_items=max_items,
        collections=[collection],
        query={"eo:cloud_cover": {"lt": max_cloud}},
        datetime = time_range,
        intersects=dict(type="Point", coordinates=[lon, lat]),
    )
    items = query.item_collection()
    return query, items 

lat = 31.731557
lon = -102.042006
query, items = pystac_query("sentinel-2-l2a'", 100, "2020-01-01/2020-08-01", lon, lat, 30)

I do not want to download the duplicate items. What is the best way to remove them from the query, or from the item_collection? Thank you.

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

No branches or pull requests

1 participant