Replies: 1 comment
-
Hi @nicokant from titiler.core.algorithm import BaseAlgorithm
from rio_tiler.models import ImageData
class UpdateStats(BaseAlgorithm):
def __call__(self, img: ImageData) -> ImageData:
stats = []
for ix in range(img.count):
stat_min, stat_max = img.array[ix].min(), img.array[ix].max()
stats.append((stat_min, stat_max))
img.dataset_statistics = stats
return img |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to understand if it would be possible using this library to apply a colormap to a COG normalizing based on the min/max of the bounding box instead of the whole raster.
In case it would be possible, could you suggest what are the options/strategies to achive that?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions