georaster-layer-for-leaflet icon indicating copy to clipboard operation
georaster-layer-for-leaflet copied to clipboard

Use theoretical min/max when min/max and pixelValuesToColorFn not provided for a COG

Open DanielJDufour opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Sometimes people want to display a COG without knowing the min/max. In these cases, we should default to using the theoretical min and theoretical maximum value. For example if it's an 8-bit COG, we should assume the range is from 0 to 255 for each band.

DanielJDufour avatar Aug 23 '21 22:08 DanielJDufour

Partially mitigated by dynamic running calculations, but could still use theoretical max/min of values array unsigned/signed 8-bit and 16-bit arrays, so when hit 0 for an unsigned array, we can stop looking for a min, and when we hit 255 with uint8 we can stop looking for a max.

DanielJDufour avatar Aug 28 '21 03:08 DanielJDufour