Skip to content

Masking out cloud values with rioxarray #232

Answered by snowman2
nkorinek asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like xarray also has the isin method.

Side note: xarray doesn't support masked arrays, it just converts to float and uses nan ref.

So, the equivalent xarray form would be:

all_masked_values = [96, 112, 160, 176, 224]
masked = landsat_pre.where(~landsat_qa.isin(all_masked_values))

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by snowman2
Comment options

You must be logged in to vote
0 replies
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