Closed
Conversation
vincentsarago
commented
Jul 7, 2022
| output_nbands: int | ||
| output_dtype: str | ||
| output_min: Optional[Sequence] | ||
| output_max: Optional[Sequence] |
Member
Author
There was a problem hiding this comment.
Those are metadata about the input/outputs of the algorithm
vincentsarago
commented
Jul 7, 2022
| tuple(map(float, r.replace(" ", "").split(","))) for r in self.rescale | ||
| ] | ||
|
|
||
| kwargs = json.loads(self.algorithm_params) if self.algorithm_params else {} |
Member
Author
There was a problem hiding this comment.
additional parameters for the algorithm must be provided as JSON encoded algo_params query parameter
Member
Author
|
TODO: add frontend support |
Member
Author
|
This was integrated directly in TiTiler |
Frontend support for algorithms as well as custom expression added in PR to titiler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR sketchs out support for complex algorithm (advanced expression)
TL&DR
we introduce the concept of the Algorithm base class
The base class has some attribute used for metadata (what inputs It needs and what outputs it will produce).
which is then used to create custom algorithm with an
applymethod that takes anImageDataobject as input and return anotherImageDataobject (rio-viz/rio_viz/app.py
Lines 306 to 307 in 68a6b6b
http://127.0.0.1:8080/preview?algo=contours&algo_params={"minz":1600,"maxz":2100,"increment":10}http://127.0.0.1:8080/preview?algo=hillshade&algo_params={"angle_altitude":20}