Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward statistics metadata in ImageData #488

Closed
vincentsarago opened this issue Mar 25, 2022 · 0 comments
Closed

Forward statistics metadata in ImageData #488

vincentsarago opened this issue Mar 25, 2022 · 0 comments

Comments

@vincentsarago
Copy link
Member

When reading a GeoTIFF dataset, we can have access to GDAL statistics dataset (if added by the user). I think it will be great if we could forward those in the ImageData (output of image methods, e.g. tile(), preview()...).

STATISTICS_MEAN: mean
STATISTICS_MINIMUM: minimum
STATISTICS_MAXIMUM: maximum
STATISTICS_STDDEV: standard deviation
STATISTICS_APPROXIMATE: only present if GDAL has computed approximate statistics
STATISTICS_VALID_PERCENT: percentage of valid (not nodata) pixel

ref: https://gdal.org/user/raster_data_model.html#metadata

If we are able to ship those in the ImageData object then we could maybe use them here https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/models.py#L333 instead of the min/max of the datatype 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant