Code Monkey home page Code Monkey logo

Comments (3)

TomAugspurger avatar TomAugspurger commented on July 28, 2024

from stackstac.

ljstrnadiii avatar ljstrnadiii commented on July 28, 2024

Thanks, @TomAugspurger--I just figured this out. Yes, collection names have also changed:

list(
    pystac_client.Client.open(
        "https://earth-search.aws.element84.com/v1"
    ).get_children()
)

Gives:

 [<CollectionClient id=cop-dem-glo-30>,
 <CollectionClient id=naip>,
 <CollectionClient id=sentinel-2-l2a>,
 <CollectionClient id=sentinel-2-l1c>,
 <CollectionClient id=landsat-c2-l2>,
 <CollectionClient id=cop-dem-glo-90>,
 <CollectionClient id=sentinel-1-grd>] 

Looking at the sentinel-2-l2a collection shows they are cogs for each band, etc. Modifying the url and collection seems to work:

import stackstac
import pystac_client

URL = "https://earth-search.aws.element84.com/v1"
catalog = pystac_client.Client.open(URL)

stac_items = catalog.search(
    intersects=dict(type="Point", coordinates=[-105.78, 35.79]),
    collections=["sentinel-2-l2a"],
    datetime="2020-04-01/2020-05-01"
).get_all_items()

stack = stackstac.stack(stac_items)
print(stack)
Screenshot 2023-09-19 at 7 47 34 AM

from stackstac.

gjoseph92 avatar gjoseph92 commented on July 28, 2024

@ljstrnadiii interestingly, I don't get this error with older versions of pystac-client. Thanks for the catch, we might as well use the newer endpoint anyway.

from stackstac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.