Unfortunately, this is a known issue (SNAP-662).
You can fix this by removing the valid-pixel expression from the bands, if you don’t need it.
or you can update the expressions.
In your case, you need to replace ‘c2rcc_flags_S3.Valid_PE_S3’ by ‘c2rcc_flags_S3.Valid_PE’
And for the other flags accordingly.
You can change the valid expression as follows:
nodes = result.getRasterDataNodes()
for n in nodes
validPixelExpression = n.getValidPixelExpression()
# Change expression
n.setValidPixelExpression(validPixelExpression)
Sorry, for the inconvenience this is causing. I hope it can be fixed soon.
I tried the one you are saying and i get the following error.
Traceback (most recent call last):
File “F:\hydromerit\Hydromedit\Ch.py”, line 259, in
for n in nodes:
TypeError: ‘java.util.List’ object is not iterable
Ah, sorry. You need to convert the list into something which Python can iterate. I’m more a Java developer and thus not really used to these specialities when using snappy.
So replace nodes = result.getRasterDataNodes()
by nodes = list(product.getRasterDataNodes().toArray())
Instead of using an empty string you could also do n.setValidPixelExpression(None)
The complete updated script:
nodes = list(product.getRasterDataNodes().toArray())
for n in nodes:
n.setValidPixelExpression(None)