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

fix STAC pagination (E84 api) #125

Merged
merged 5 commits into from Oct 15, 2020
Merged

fix STAC pagination (E84 api) #125

merged 5 commits into from Oct 15, 2020

Conversation

vincentsarago
Copy link
Member

@vincentsarago vincentsarago commented Oct 15, 2020

closes #121

@vincentsarago
Copy link
Member Author

vincentsarago commented Oct 15, 2020

TODO

other API we can test ?

@vincentsarago

This comment has been minimized.

@vincentsarago
Copy link
Member Author

The proposed script will work with old and new API.

By default we will add page=X in the stac query (this is for old style API), For new API using Next links, user will need to use set the stac_next_link_key option to tell the backend to get the new query from the links.

with MosaicBackend(
    f"stac+{stac_endpoint}",
    query.copy(),
    11,
    14,
    backend_options={
        "accessor": lambda feature: feature["id"],
        "stac_next_link_key": "next",
    }
) as mosaic:

cc @geospatial-jeff

@vincentsarago vincentsarago marked this pull request as ready for review October 15, 2020 19:02
@vincentsarago vincentsarago changed the title temporary fix for STAC pagination (E84 api) fix STAC pagination (E84 api) Oct 15, 2020
@vincentsarago vincentsarago merged commit 4946b9c into master Oct 15, 2020
@vincentsarago vincentsarago deleted the fixStacBackend branch October 15, 2020 19:25
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

Successfully merging this pull request may close these issues.

update stac pagination logic to match spec
1 participant