Skip to content

Issue rendering singleband image with colormap via stac endpoint #235

Answered by vincentsarago
aliasmrchips asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks @aliasmrchips for the question.
You are right, the STACReader (used in the /stac) endpoint is loosing the information about the internal colormap of the item. This is by design and sadly there isn't an easy way of fixing this.

when you are using the /cog endpoint, you are using https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/io/cogeo.py#L28 and

colormap = render_params.colormap or getattr(
src_dst, "colormap", None
)

☝️ in this, if the COGReader instance has a colormap variable, it will be used by default, and that's what you are getting.

For /stac, we are using a specific read…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@aliasmrchips
Comment options

@vincentsarago
Comment options

Answer selected by vincentsarago
Comment options

You must be logged in to vote
1 reply
@aliasmrchips
Comment options

Comment options

You must be logged in to vote
5 replies
@aliasmrchips
Comment options

@vincentsarago
Comment options

@aliasmrchips
Comment options

@vincentsarago
Comment options

@aliasmrchips
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants