Skip to content

Is nodata applied before expressions? #976

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

You must be logged in to vote

Hi @agasparovic

Thanks for starting this discussion.

The mask is created for the data itself, expression won't update the mask.

Can you tell a bit more of what you're doing: what rescaling or colormap you are using?

Is there something else I could be doing to make this work?

Custom Algorithm might solve this for you (https://developmentseed.org/titiler/advanced/Algorithms/, https://developmentseed.org/titiler/examples/code/tiler_with_custom_algorithm/)

👇 not tested so might be wrong

import numpy
from titiler.core.algorithm import BaseAlgorithm
from rio_tiler.models import ImageData

class Correct(BaseAlgorithm):

    input_nbands: int = 1
    output_nbands: int = 1

    def __call__(self, 

Replies: 1 comment 1 reply

Comment options

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

Answer selected by agasparovic
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