GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
284 stars 57 forks source link

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

Open DanielJDufour opened 2 years ago

DanielJDufour commented 2 years ago

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 commented 2 years ago

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.