What determines if a pixel is 'valid' for /cog/statistics
#711
-
Does the If yes, it might be nice to be able send in a parameter to instruct the calculations to account for pixel values that intersect the edge of the area of interest. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@mmnoo depends on your titiler version but starting with version
By default rio-tiler will includes all pixels that touches the shape, but as I said in titiler we've added spatial weight. We could maybe make this configurable but I'm not sure I have time right now ref: |
Beta Was this translation helpful? Give feedback.
@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.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: