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

Update WorldCover Search to Return LULC Raster #23

Open
Jack-Hayes opened this issue Nov 20, 2024 · 2 comments
Open

Update WorldCover Search to Return LULC Raster #23

Jack-Hayes opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jack-Hayes
Copy link
Member

Update coincident.search.search(dataset='worldcover') to return 2021 LULC of the bbox of an input geometry (GeoDataFrame or GeoSeries). Maybe returned clipped raster and print distribution statistics too?

Building off of code below:

catalog = pystac_client.Client.open(
    "https://planetarycomputer.microsoft.com/api/stac/v1",
    modifier=planetary_computer.sign_inplace,
)
search = catalog.search(collections=["esa-worldcover"], 
                            bbox=bbox)
items = search.item_collection()
@Jack-Hayes Jack-Hayes self-assigned this Nov 20, 2024
@Jack-Hayes Jack-Hayes added the enhancement New feature or request label Nov 20, 2024
@scottyhq
Copy link
Member

To get the raster I suggest converting from the geodataframe back to pystac items to pass to odc-stac:

items = coincident.search.stac.to_pystac_items(gf)
ds = odc.stac.load(
    items,
    bbox=search_bbox,
)

I might open an issue on odc-stac to accept the geodataframe/stac-geoparquet directly (I think the to_pystac_items could be avoided since all the information is already in memory)!

@scottyhq
Copy link
Member

Some enhancements in GDAL will also streamline this sort of workflow! OSGeo/gdal#11317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants