Is your feature request related to a problem? Please describe.
Its frustrating that I need to invoke georaster.redraw() to update the colour of my multi-spectral map. It removes all tiles before redrawing showing a flash of blank screen before the image is updated.
Describe the solution you'd like
Add an updateColours method that takes an updated pixelValuesToColorFn. This method should recolour the pixels with the new function.
Describe alternatives you've considered
An alternative is to use the redraw() method of L.GridLayer however this is sub-optimal as describe above.
Additional context
The motivation for such a feature is for setting dynamic thresholds on multi-spectral images. This will allow use cases where a user need to highlight certain parts of an image. In our case we use a historgram with range-sliders to set the thresholds on an NDVI map.
I'd be more than happy to put together a PR if there is interest for this feature. We are hoping to begin making use of COG's and this feature would be critical for it's success.
Is your feature request related to a problem? Please describe. Its frustrating that I need to invoke
georaster.redraw()
to update the colour of my multi-spectral map. It removes all tiles before redrawing showing a flash of blank screen before the image is updated.Describe the solution you'd like Add an
updateColours
method that takes an updatedpixelValuesToColorFn
. This method should recolour the pixels with the new function.Describe alternatives you've considered An alternative is to use the
redraw()
method ofL.GridLayer
however this is sub-optimal as describe above.Additional context The motivation for such a feature is for setting dynamic thresholds on multi-spectral images. This will allow use cases where a user need to highlight certain parts of an image. In our case we use a historgram with range-sliders to set the thresholds on an NDVI map.
I'd be more than happy to put together a PR if there is interest for this feature. We are hoping to begin making use of COG's and this feature would be critical for it's success.
https://user-images.githubusercontent.com/32762874/102787159-888d8c80-4398-11eb-9502-68e5ec048903.mov