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.
closes #340
This PR adds 2 new endpoints per TilerFactories
GET - /statistics
: get stats from a preview of a datasetPOST - /statistics
: get stats from a feature covering a datasetTo Be Discussed
Per the HTML specification,
list
must be passed using multiple parameter (e.gp=1&p=2
) and is also supported in openapi. When we started titiler we (I) didn't knew about this and usedcomma delimited string
(e.gbidx=1,2,3
) to allow list input. In the PR the statistics endpoints have 2list
inputs: c (categories) and p (percentiles). I've choose to keep the name small because those will be repeated in the query_param (e.gp=1&p=2
to definepercentiles=[1, 2]
).I'm open to discuss either we should follow the spec or use
comma delimited values
. I've already raised this over #262 (comment)IMO we should switch every
list
input to this, but as it's a breaking change I'll think starting to implement this for new QueryParameters is the safest way 🤷Here is example of
statistics
result