No Data Mask query

Hi,

We are processing Proba-1 CHRIS data from L0 to L1, creating COG format outputs. The COG file is tagged with nodata = 0.

In version 11 of SNAP, this works correctly. The missing pixels have a value of 0, reported a NaN, and the automatically generated no data mask correctly masks out these pixels.

When updating SNAP to v13, it now shows the no data pixels as having a value of -1. I am not sure why it does this. As a result the no data masks are blank as there are no no-data pixels to mask out (as they have a value of -1 instead of the expected 0).

I tried changing the layer settings to show the no-data pixels as 0. It then correctly shows them as 0 instead as -1 but it doesn’t change/update the no-data mask.

Why is there this change between SNAP versions and what can I do about it? It seems like SNAP isn’t reading the COG tag correctly. Or is -1 the standard no-data value we should use, i.e. change the COG tag to -1 for no data.

Thanks in advance for your help and advice.

That sounds like a frustrating change between versions! Have you checked the ‘Mask Manager’ in v13 to see if you can manually redefine the expression for the no-data mask? It might be that SNAP is defaulting to a different metadata reader for COGs now. If updating the expression to value == -1 works, it might be a temporary workaround while the devs look into the tag reading issue.

Jira ticket SNAP-4169 created

1 Like

Thanks for the suggestion, I’ll give that a try!