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.
Uh oh!
There was an error while loading. Please reload this page.
-
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
int16values 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.:
[ [ [ 0, 3750 ], [ 247, 252, 253, 255 ] ], [ [ 3750, 7500 ], [ 229, 245, 249, 255 ] ], [ [ 7500, 11250 ], [ 204, 236, 230, 255 ] ], [ [ 11250, 15000 ], [ 153, 216, 201, 255 ] ], [ [ 15000, 18750 ], [ 102, 194, 164, 255 ] ], [ [ 18750, 22500 ], [ 65, 174, 118, 255 ] ], [ [ 22500, 26250 ], [ 35, 139, 69, 255 ] ], [ [ 26250, 30000 ], [ 0, 88, 36, 255 ] ], [ [ 30000, 32766 ], [ 0, 0, 0, 0 ] ] ]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