-
Notifications
You must be signed in to change notification settings - Fork 5
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
init #1
init #1
Conversation
|
||
|
||
@attr.s | ||
class STACAPIBackend(BaseBackend): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a custom MosaicBackend which will call the /search
API on each tile request to get the list of assets
params.pop("bbox", None) | ||
|
||
results = catalog.search(**params) | ||
return list(results.items_as_dicts()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using pystac-client
to call the STAC API and handle the pagination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: we are using .items_as_dicts
to avoid serialization to pystac Item.
We are also using a custom (simple) STAC Reader which expects Dict as input
# "filter": query, | ||
# "filter-lang": filter_lang, | ||
"limit": limit or 100, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main
dependency for the /collections
mosaic endpoint. Only collectionId
is required for now
Note: This is assuming we only want to visualize ONE collection at a time.
Initial PR with
/collections/{collectionId}
and/collections/{collectionId}/items/{itemId}
set of endpoints. Most of the code comes from titiler-pgstac and titiler-cmr