Skip to content

What determines if a pixel is 'valid' for /cog/statistics #711

Answered by vincentsarago
mmnoo asked this question in Q&A
Discussion options

You must be logged in to vote

@mmnoo depends on your titiler version but starting with version 0.15.0 the /cog/statistics [POST] endpoint will return statistics weighted with the spatial coverage of the intersecting shape.

only consider pixel values that are completely within an area of interest?

By default rio-tiler will includes all pixels that touches the shape, but as I said in titiler we've added spatial weight.
https://github.com/cogeotiff/rio-tiler/blob/775ecfd513b452765154c20f9693db764e6cf69f/rio_tiler/io/rasterio.py#L573-L581

We could maybe make this configurable but I'm not sure I have time right now

ref:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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
2 participants