Skip to content
Discussion options

You must be logged in to vote

I just released titiler==0.5.0 which revert the /stac/statistics endpoint to something that should be compatible with the previous usage (using expression). The statistics endpoint from 0.4 is now called asset_statistics.

import httpx
url = "https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json"

params = {
    'url': url,
    'assets': ['B4', 'B3']
}
r = httpx.get("https://titiler.xyz/stac/statistics", params=params).json()
print(r)
>> {'B4_1': {'min': 1.0, 'max': 251.0, 'mean': 106.47252138997298, 'count': 532960.0, 'sum': 56745595.0, 'std': 42.86800969934866, 'median': 118.0, 'majority': 12…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@TomAugspurger
Comment options

@giswqs
Comment options

Comment options

You must be logged in to vote
1 reply
@giswqs
Comment options

Answer selected by vincentsarago
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants