Hello all, I am considering using COGs as a data visualization tool in a web application and could use some advice. We’re currently using the ESRI JavaScript mapping API, which allows for COG layers, but only photometric RGB COGs. It doesn’t have the ability to render floating point data on the fly in the web browser. I know there is the amazing CarbonPlan CMIP demo web application that renders xarray data in real-time, but this requires a server side backend. I’m hoping for a solution that doesn’t require a backend, so photometric RGB COGs in a simple map viewer seems to fit the bill, but all the rendering options will be locked in.
So, the question is: what is the most efficient workflow to go from an xarray data source to an RGB COG? There is the rio.to_raster() method, but I need to apply a colormap and vmin/vmax range to render floating point values to RBG bands. Well, perhaps RGBA to account for missing values since the data are land only and the oceans should be transparent. I could potentially use xarray.apply_ufunc to do the color interpolation myself, but I was hoping there was already a library for this workflow.
Thanks