Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums:

Combination View Flat View Tree View
Threads [ Previous | Next ]
RE: NaN's to 1's
NaN's to 1's
4/10/14 12:17 PM
Hi Beam forum,

Apologies for yet another question but I'm having a problem with a cloud mask. I need to convert NaN's in the cloud mask to 1's. The conditional statement a ? b : c is not working as I would expect when dealing with NaN's.

How is NaN evaluated in a boolean operation?

In the Expression editor dialogue box regardless what I set "Replace NaN and infinity results by" to I still get NaN's.

Thanks in advance.

Best regards

Flag Flag
RE: NaN's to 1's
4/13/14 1:43 PM as a reply to Kieran Harper.
Hi Kieran,

Maybe you simply need to remove the no-data value and/or the valid pixel expression. You can find both settings in the properties dialogue of the band.
If you want to check for NaN values you can use the nan(value) function.
Your expression could be: nan(cloud_mask) ? 1 : cloud_mask

Flag Flag
RE: NaN's to 1's
4/29/14 12:59 PM as a reply to Marco Peters.
Thanks again Marco for your answers.


Flag Flag