Add custom GDAL color table support for COG layers via TiTiler#1017
Open
jdrodjpl wants to merge 5 commits into
Open
Add custom GDAL color table support for COG layers via TiTiler#1017jdrodjpl wants to merge 5 commits into
jdrodjpl wants to merge 5 commits into
Conversation
Contributor
✅ Version Already UpdatedThis PR includes a manual version update to No automatic version bump needed. |
tariqksoliman
requested changes
Jul 20, 2026
Adds a cogColormapJson layer config field ("Custom Color Table (GDAL)",
in its own section of the COG tab) that is passed through to TiTiler's
`colormap` query parameter. Accepts either a discrete value-to-RGBA map
(e.g. {"1":[10,40,85,255]}) or a list of [[min,max],RGBA] intervals,
letting classified rasters (land cover, sea-ice type, etc.) be colored
by raw pixel value.
Behavior:
- The color table supersedes the named Colormap (colormap_name), and
the Colormap dropdown disables itself with an explanatory tooltip
when both a color table and the COG transform are set (via a new
generic `disableWhen` hook in the configure app's Maker)
- rescale is suppressed when a color table is set: TiTiler applies
rescale before the colormap lookup, which would remap raw values
away from the table's keys
- A discrete legend (one labeled color chip per class or interval,
suffixed with cogUnits) is generated automatically through the
LegendTool/populateCogScale path, with or without the COG transform
enabled; fully transparent entries (e.g. nodata) are skipped
- The layer settings panel renders the color table as a swatch strip
in place of the named-colormap preview image
jdrodjpl
force-pushed
the
cog-gdal-colortable-clean
branch
from
July 21, 2026 18:43
5562c92 to
28b869b
Compare
jdrodjpl
force-pushed
the
cog-gdal-colortable-clean
branch
from
July 21, 2026 18:48
fe275c3 to
234db9f
Compare
tariqksoliman
approved these changes
Jul 21, 2026
tariqksoliman
left a comment
Member
There was a problem hiding this comment.
LGTM! Feel free to merge.
Member
|
Oh, one thing I forgot: If possible can you add a layer to the Reference-Mission blueprint showing off this feature, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a cogColormapJson layer config field ("Custom Color Table (GDAL)", in its own section of the COG tab) that is passed through to TiTiler's
colormapquery parameter. Accepts either a discrete value-to-RGBA map (e.g. {"1":[10,40,85,255]}) or a list of [[min,max],RGBA] intervals, letting classified rasters (land cover, sea-ice type, etc.) be colored by raw pixel value.Behavior:
disableWhenhook in the configure app's Maker)