Replies: 2 comments 2 replies
-
👋 @gadomski do you mean that you want:
I'm not sure about this but maybe you could try to create a discrete colormap (mapping every values of the Uint16 data to a RGBA values), and use
This is more a rio-tiler/titiler question and I don't see what is wrong with what you are using right now. Worth noting that you are using a |
Beta Was this translation helpful? Give feedback.
-
There are 2 things here, either the COG has an internal colormap (https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/io/cogeo.py#L195-L201, https://github.com/developmentseed/titiler/blob/master/src/titiler/core/titiler/core/factory.py#L495) which can be added with GDAL or rio-cogeo Or you dynamically tell titiler/rio-tiler to colourize the data with a given colormap as defined by rio-tiler (https://cogeotiff.github.io/rio-tiler/colormap/) with the possibility to either be:
Well you just need to create more intervals 🤷♂️ note: |
Beta Was this translation helpful? Give feedback.
-
Tl:dr; Is there a way to define a continuous colormap while still mapping multiple values to transparency?
We're using rio-cogeo (via titiler) to display COG-ified MODIS products. Some MODIS products, e.g. MOD17A3HGF, have continuous data that we'd like to display with a continuous colormap. However, these products also have multiple "fill values" that make displaying "nodata" as transparent pixels tricky. E.g. MOD17A3HGF has the following two continuous variables:
These
int16
values also have "fill values" at the top end of their domain -- we want to display all of these values as transparent pixels:For now, we're using an intervals colormap to get close to what we want, e.g.:
Is there a way to define a continuous colormap while still mapping multiple values to transparency? If not, is this something that could be implemented? I'm happy to dig in an give it a shot if its something that's possible.
Beta Was this translation helpful? Give feedback.
All reactions